Dec 232017
Very good input routine that formats and allows editing of user input.
File PTOOLENT.ZIP from The Programmer’s Corner in
Category Pascal Source Code
Very good input routine that formats and allows editing of user input.
File Name File Size Zip Size Zip Type
PTOOLENT.DOC 5248 1918 deflated
PTOOLENT.INC 20864 4356 deflated
PTOOLENT.PAS 6016 1465 deflated

Download File PTOOLENT.ZIP Here

Contents of the PTOOLENT.DOC file

PTOOLENT.INC Copyright 1984 R D Ostrander Version 1.0
Ostrander Data Services
5437 Honey Manor Dr
Indianapolis IN 46241

This Turbo Pascal include file is a display and data entry tool. It Displays
a given String (or Character Array), Integer, or Real (Dollar) data field
in a given screen area and allows the operator to make changes via the
keyboard. It allows the operator to end the editing using many ending
keys and passes information about those keys to the calling program.

This program has been placed in the Public Domain by the author and copies
may be freely made for non-commercial, demonstration, or evaluation purposes.
Use of these subroutines in a program for sale or for commercial purposes in
a place of business requires a $20 fee be paid to the author at the address
above. Personal non-commercial users may also elect to pay the $20 fee to
encourage further development of this and similar programs. With payment you
will be able to receive update notices, diskettes and printed documentation
of this and other PTOOLs from Ostrander Data Services.

PTOOL, and PTOOLxxx are Copyright Trademarks of Ostrander Data Services.

Turbo Pascal is a Copyright of Borland International Inc.

The Call format for PTOOLENT is:

Set Data initial display value.
Set DataType type of edit.
Set DisplaySize number of spaces for display.
Set DisplayDecimals for Real numbers only.
Set ReturnCode need not be set but must be a variable.
GoToXY (X, Y) to set the Display Area location.
PTOOLENT (Data, DataType, DisplaySize, DisplayDecimals, ReturnCode);

Examples: Var CustomerName : String [24];
ReturnCode : Integer;
CustomerName := ' ';
Gotoxy (1,1)
PTOOLENT (CustomerName, 'S', 24, 0, ReturnCode);

See companion program PTOOLENT.PAS for further examples.

Note that the DisplaySize must be > DisplayDecimals + 1.

Invalid data and cursor movements cause beeps to the operator.

Editting Keys for use by the operator are:

Left Arrow : Move cursor to left one position
Right Arrow : Move cursor to right one position
Ctrl-Left Arrow : Move cursor to 1st position
Ctrl-Right Arrow : Move cursor to first position past last character
Tab : Move cursor right to next word
Shift-Tab : Move cursor left to previous word
Backspace : Erase character to left of cursor
Del : Erase character under cursor
Ctrl-E : Erase editing area
Ctrl-F : Fill field with character to left of cursor
Ctrl-X : Erase all characters from cursor on
Ctrl-L : Left justify data
Ctrl-R : Right justify data
Ctrl-S : Start Editting over
Ctrl-N or Ctrl-Q : Quit with no change in data
Ctrl-P : Retreive Previous data or Ctrl-E(rased) data
Ctrl-U : Change all data to Upper Case
Ctrl-D : Change all data to Lower Case
Ins : Toggle Insert function on/off

Alt-Numerics may be used to enter character graphics codes

Return codes are:

0 = Esc
1 = C/R or Ctrl-N or Ctrl-Q
2 = (Filled Field)
3 = Ctrl-Break or Ctrl-C (if $C- not set)
16-26, 30-38, 44,50 = Alt-Alphabetics
59-68 = F1 - F10
71 = Home These are the codes returned to the
72 = Up Arrow calling program in the ReturnCode
73 = PgUp field when the operator ends the
79 = End editing by pressing one of these
80 = Down Arrow keys. Other key combinations can
81 = PgDn also cause an end of edit & return
84-93 = Shift F1 - F10 spurious codes. Note that the code
94-103 = Ctrl F1 - F10 of 2 is returned when the operator
104-113 = Alt F1 - F10 enters a character (or space) in
114 = Ctrl-PrtSc the last position of the field.
117 = Ctrl-End
118 = Ctrl-PgDn
119 = Ctrl-Home
132 = Ctrl-PgUp

Now go out and try PTOOLENT and by all means, look at the code of both
PTOOLENT.PAS and PTOOLENT.INC to completely understand how to incorporate
the Ostrander Data Services product into your programs.

Write to find out about other ODS software available that might not be
on this bulletin board.

 December 23, 2017  Add comments

Leave a Reply