home *** CD-ROM | disk | FTP | other *** search
- !SHORT:ReadLine Provide line input/editing facility
- ReadLine ReadTTT
-
-
-
- Purpose To provide a line input/editing facility
-
- Declaration ReadLine( X,Y,L,F,B: byte
- var Text: string;
- var Retcode: string);
-
- X is the X coord of input field (1..80)
- Y is the Y coord of input field (1..25)
- L is the length in chars of input field(1..80)
- F is the foreground color (0..15)
- B is the background color (0..7)
- Text is returned with the users input
- Retcode indicates if user Escaped.
-
- Uses CRT, FastTTT, ReadTTT.
-
- Remarks "Text" must be declared as a string variable. This variable
- is returned with the users input. If you want to provide the
- user with a default entry, set the value of Text to the
- desired default string, otherwise set it to null, i.e. ''.
-
- "Retcode" must be an integer variable and it is returned
- with the following values:
- 0 successful completion
- 1 user ESCaped
-
- Example
-
-
- USES CRT, FASTTTT, READTTT;
- VAR
- THEFILE: STRING;
- CODE : INTEGER;
- BEGIN
- THEFILE := '';
- WRITEAT(10,5,WHITE,BLACK,'ENTER THE FILENAME ===>');
- REPEAT
- READLINE(33,5,12,BLACK,LIGHTGRAY, THEFILE, CODE);
- UNTIL CODE = 0;
- END.
-
-
- A 12 character field is presented for the user to input a filename. If
- the user ESCapes, the system will re-prompt for a filename.
-