*/
Check out and contribute to CodePedia, the wiki for developers.
*/

View \TUTOR08.PAS

Halcyon version 3.0

Submitted By: Unknown
Rating: (Not rated) (Rate It)


program Tutor08;
{$N+,E+}          {Required for floating point number handling}
uses
   CRT,
   GSOB_DBF,
   GSOB_VAR;
var
   MyFile  : GSO_dBaseFld;
   MNum    : real;
begin
   ClrScr;
   MNum := 0;
   MyFile.Init('TUTOR1');
   MyFile.Open;
   MyFile.GetRec(Bttm_Record);
   MyFile.NumberPut('PAYMENT',1234.56);
   MyFile.PutRec(MyFile.RecNumber);
   MyFile.GetRec(Top_Record);
   while not MyFile.File_EOF do
   begin
      MNum := MNum + MyFile.NumberGet('PAYMENT');
      writeln(MyFile.DelFlag:6,'  ',MyFile.RecNumber:4,'  ',
              MyFile.FieldGet('LASTNAME'),'  ',
              MyFile.FieldGet('PAYMENT'));
      MyFile.GetRec(Next_Record);
   end;
   writeln('TOTAL':44,'  ',MNum:9:2);
   MyFile.Close;
end.

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.