home *** CD-ROM | disk | FTP | other *** search
- Program PTOOLSCR; {Copyright R D Ostrander
- Ostrander Data Services
- 5437 Honey Manor Dr
- Indianapolis IN 46241
-
- This is a demonstration program for the Turbo Pascal subroutine PTOOLSCR
- for record editting and displaying. Address any questions to the author
- at the above address. }
-
- { $ C - } { This parameter is optional - the PTOOLENT subroutine will identify
- and report Ctrl-Break during field editting. }
-
- {$V-} { This parameter is necessary in order to pass String parameters
- of other than 80 characters. }
-
-
-
- {$I PTOOLENT.INC} {Include statement for PTOOLENT procedure}
- {$I PTOOLSCR.INC} {Include statement for PTOOLSCR procedure}
-
-
- CONST
-
- ScreenTable : Array [1..6] of PTOOLSCR_Field_Array
- =('D0101Editting Area Below - Press Esc to quit 0 0 0 00',
- 'S0503Last Name : 0011703240',
- 'B0605Your Age : 0261705020',
- 'C2405Your First Initial : 0274505010',
- 'R0107Your Zip Code : 0281707050',
- 'I0109Pick a number between -32765 and 32767 0344109060');
-
- DisplayTable : Array [1..6] of PTOOLSCR_Field_Array
- =('D0101You entered : 0 0 0 00',
- 'C0000 0270703010',
- 'S0103Name 0010903240',
- 'B0205Age 0260705020',
- 'R0207Zip 0280707050',
- 'I0409# 0340709060');
-
-
- TYPE
-
- TestRecord = Record
- YourName : String [24];
- YourAge : Byte;
- YourInit : Char;
- YourZip : Real;
- YourNum : Integer;
- End;
-
-
- VAR
-
- Test : TestRecord;
- ReturnCode : Integer;
- LastField : Integer;
-
-
- BEGIN
-
- ClrScr;
- Gotoxy (29,2); Write ('Demonstration of PTOOLSCR procedure.');
- Gotoxy (29,4); Write ('PTOOLSCR and this program are copyrights');
- Gotoxy (29,5); Write ('of R D Ostrander');
- Gotoxy (29,6); Write (' Ostrander Data Services');
- Gotoxy (29,7); Write (' 5437 Honey Manor Dr');
- Gotoxy (29,8); Write (' Indianapolis IN 46241');
- Gotoxy (29,10); Write ('and have been placed in the public domain.');
-
- ReturnCode := 1;
- With Test do
- Begin
- YourName := ' ';
- YourAge := 0;
- YourInit := ' ';
- YourZip := 0;
- YourNum := 0;
- End;
-
- While ReturnCode <> 0 do
- Begin
- Window (33, 13, 80, 25);
- PTOOLSCR (Test, ScreenTable, 6, ReturnCode, LastField, ' ', ' ', 1);
- Window (1, 13, 32, 25);
- PTOOLSCR (Test, DisplayTable, 6, ReturnCode, LastField, 'D', ' ', 1);
- Window (1, 1, 80, 25);
- With Test do
- Begin
- Gotoxy (1,9);
- Writeln ('Return Code: ', ReturnCode:3);
- Writeln (' LastField: ', LastField:3);
- End;
- End;
-
- Gotoxy (1,24);
- END.