Category : Pascal Source Code
Archive   : GETFIELD.ZIP
Filename : GETFIELD.DOC

 
Output of file : GETFIELD.DOC contained in archive : GETFIELD.ZIP
Author : Jim Luckas [76630,370]
Date : 3-21-88

Getfield.doc - Documentation for getfield.tpu

The source code is for you to freely use and modify as you wish.
Without any worry about royalties or registration.
* All code is done using only turbo calls. No Asmembly at all.
* Below is a list of the procedures and brief explanations of each
of the procedures in getfield.tpu.
* See the code in GetFDemo.pas for an example of usage.

-----------------------------------------------------------------

procedure SetUp_Field(ActiveFColor,InactiveFColor : Byte;
ClearChar : Char;
EscKey : Boolean);
Used to Reset the global variables for getfield.tpu to your own
values.
1) This procedure can be called by you during the program at anytime
or not at all.
2) ActiveFColor is the color that which the active field color
will be.
- The default is $70 (Reverse video).
3) InActiveFColor is the color that the Active Field will be
returned to after leaving that field.
- The default is $07 (Normal video).
4) ClearChar is the character that the blank portion of the
active field will be seen as.
- The default is ' ' the Space Character.
5) EscKey is a boolean expression determining wether you are
allowed to exit Do_Fields with an ESC key.
- The Default is True.

-----------------------------------------------------------------

procedure Field_Str(Xpos, Ypos, Len, Opts : Byte; Var
UserStr : String; Format : Char);
Used to define the fields that you want to display.
1) Xpos - X coordinate of the field.
2) Ypos - Y coordinate of the field.
3) Len - Length of the Field.
4) Opts - Options to be acted upon the field.
a) 0 - No options
b) 1 - Clear the UserString before use.
c) 2 - Clean the UserString of Leading and trailing spaces
upon exit.
d) 3 and greater - Do Both 1 and 2.
5) UserStr - Any string variable to be acted upon for that
field.
6) Format - Format of the Field.
a) 'U' - Change all input to uppercase.
b) 'L' - Allow any type of input.
c) 'N' - Allow only numeric type of input. (1234567890.)

-----------------------------------------------------------------

procedure Release_Fields;
Used to release all the field variables stored in memory.
You should use this after each Do_Fields call if you want to
use other fields for data entry otherwise these fields will be
used again next time.

-----------------------------------------------------------------

procedure CleanString(var S : String);
Used internally for cleaning all leading and trailing spaces
from a string.
1) You can use this at anytime to clean a string by passing
the string to be cleaned.

-----------------------------------------------------------------

procedure GetString(Ypos,Xpos,Attr,Len,Opts : Byte;
Var Str255 : String;
Legal : Char;
Var Keyval : Integer);
Used internally for Data entry of only one string.
1) You can use this as a stand alone call for just one string
of data to be entered or edited. Although the attribute of
the field will be changed upon exit to the value of
InactiveFColor.
a) Ypos - Y coordinate of the field.
b) Xpos - X coordinate of the field.
c) Attr - Attribute of the Field to be edited or entered.
c) Len - Length of the Field.
d) Opts - Options to be acted upon the field.
0 - No options
1 - Clear the UserString before use.
2 - Clean the UserString of Leading and trailing spaces upon
exit.
3 and greater - Do Both 1 and 2.
e) Str255 - Any string variable to be acted upon for that field.
f) Legal - Format of the Field.
'U' - Change all input to uppercase.
'L' - Allow any type of input.
'N' -Allow only numeric type of input. (1234567890.)
g) Keyval - Value of the exit key used.

-----------------------------------------------------------------

procedure Do_Fields(Var KeyVal : Integer);
Used after you have defined the fields with the call to
Field_Str.
1) KeyVal - returns the Value of the exit key used.
if its an extended key then the value is added to
256.

-----------------------------------------------------------------

function Get_Key : integer;
Used to get a keyStroke response from the user;
1) Returns and integer value of the KeyStroke.
a) If the KeyStroke is one of the extended keys then 256 is
added to the value.

-----------------------------------------------------------------


  3 Responses to “Category : Pascal Source Code
Archive   : GETFIELD.ZIP
Filename : GETFIELD.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/