Dec 222017
 
Quick Basic 4.5 data screen formatting/input routines.
File SCREEN12.ZIP from The Programmer’s Corner in
Category BASIC Language
Quick Basic 4.5 data screen formatting/input routines.
File Name File Size Zip Size Zip Type
COMDEF.BAS 1019 440 deflated
COMDIM.BAS 129 95 deflated
DEMO.BAS 3389 1129 deflated
LISTING.BAS 128 24 deflated
SCREEN.BAS 13156 3532 deflated
SCREEN.DOC 8922 2622 deflated
SHARED.BAS 536 242 deflated
SUBDIM.BAS 123 91 deflated
TPCREAD.ME 199 165 deflated

Download File SCREEN12.ZIP Here

Contents of the SCREEN.DOC file


SCREEN.BAS V1.0 (12/15/86)
SCREEN.BAS V1.1 (01/02/87) DELETED UNUSED COMMON VARIABLES.
POLISHED UP THIS DOC.
SCREEN.BAS V1.2 (04/24/87) ADDED DATE AND TIME INPUT TYPES.
FIXED MINOR BUG. WHEN EDITING A FIELD
IF CHARACTERS WERE DELETED WITHOUT MAKING
ANY OTHER CHANGE THE FIELD WAS NOT BEING
UPDATED.
AUTHOR:

BRIAN D SNYDER
DIGITAL DATA SYSTEMS
6929 LAKESIDE AVE.
RICHMOND, VA 23228
804-262-0949

RULES FOR USE OR DISTRIBUTION:

NONE ! (AND I WON'T LOWER MYSELF TO ASK FOR $$$)

PLEASE LET ME KNOW ABOUT ANY BUGS,
AND SEND ME COMMENTS AND SUGESTIONS, THANKS....

BACKGROUND:

Before getting involved with programming on PC'S, I wrote
real-time order entry applications on the DEC PDP11's using
MACRO-11 for about 8 years. I had developed a library of screen
routines which was the basis for my program development.
In 1985 I went out and bought a TANDY 1000 (back then as a DEC
programmer it was hard to consider buying a I-B-M P-C !).
After writting some small programs using BASIC, I realized
that I really missed the screen routines that I had been
using on the DEC for many years. I knew enough about BASIC
to be dangerous, and decided to scrounge around compuserve
for some examples. I came across NELSON FORD'S INKEY.BAS
and used that as a base for my field input routine. Since
I must have downloaded hundreds of programs and routines
from boards across the country, I hope this is a start to
pay the PUBLIC DOMAIN system back !

REQUIREMENTS:

QUICKBASIC VERSION 1.X OR 2.X
(THIS WAS MAINLY DEVELOPED UNDER V1.0, I KNOW THIS COULD BE
MORE STRUCTURED BY TAKING ADVANTAGE OF V2.0 FEATURES.)

QB DEMO.BAS,,NUL
QB SCREEN.BAS,,NUL/X
LINK DEMO+SCREEN;

ROUTINES:

****** IN MANY OF THE CALLS I USED ARRAYS FOR ARGUMENTS WHICH ALLOWED ME TO
BE MORE FLEXABLE IN DISPLAYING AND ACCEPTING FIELDS, BUT OF COURSE YOU
MAY WISH TO JUST USE VARIABLES....


CALL: CHGATTR (ARG1%,ARG2%,ARG3%,ARG4%)

DESCRIPTION: CHANGES ATTRIBUTES OF CHARACTERS ON SCREEN

ARGUMENTS: ARG1% = ROW
ARG2% = STARTING COLUMN
ARG3% = ENDING COLUMN
ARG4% = ATTRIBUTE



CALL: FUNCTIONS (ARG1$)

DESCRIPTION: DISPLAYS FUNCTION KEY DEFINITIONS

ARGUMENTS: ARG1$ = STRING OF FUNCTION KEY DEFINITIONS SEPERATED BY
COMMAS. (CAN OMITT KEYS WITH COMMAS ALONE)



CALL: ACCEPT (ARG1$(),ARG2$)

DESCRIPTION: ACCEPTS DATA.

ARGUMENTS: ARG1$() = ARRAY ELEMENT CONTAINING A 6 ARGUMENT STRING

ARG1 = LINE #
ARG2 = COLUMN #
ARG3 = FIELD DEFINITION
REV = REVERSE VIDIO

ALP = ALPHA
NUM = NUMERIC
DEC = DECIMAL

DATE = FORMATTED DATE INPUT "MM/DD/YY"
MUST INPUT LEADING ZEROS !!!
USES 8 COLUMNS ON SCREEN, RETURNS
A 6 CHARACTER STRING.

TIME = FORMATTED TIME INPUT "MM:HH"
MUST INPUT LEADING ZEROS !!!
USES 5 COLUMNS ON SCREEN, RETURNS
A 4 CHARACTER STRING.

LCK = "LOCKS" (SKIPS) INPUT FOR THIS FIELD
THIS ALLOWS YOU TO CHANGE WHAT FIELDS
ARE PROMPTED FOR BY JUST CHANGING THE
ARG1$() STRING FOR EACH FIELD.

CAP = CHANGES ANY LOWER CASE INPUT TO UPPER

NODEF = NO NUM OR DEC DEFAULT (NO 0 OR 0.00 )
(IF RETURN IS PRESSED WITH NO INPUT
NO VALUE WILL BE LOADED INTO THE
OUTPUT FIELD.)

ARG4 = FORMATTED DATA LENGTH

(IF DEC THEN ARG4 WILL BE THE FIELD LENGTH
INCLUDING THE DECIMAL POINT,
BUT THE ACTUAL DECIMAL POINT "." WILL
NOT BE RETURNED IN THE OUTPUT FIELD, THERE
WILL BE AN ASSUMED DECIMAL POINT.

EXAMPLE OF DECIMAL TYPE INPUT:

INP$(1)="06,02,NUM!DEC,9,ACCOUNT"

( 1 [RETURN] = " 100" )
( 1.5 [RETURN] = " 150" )
( 1.50 [RETURN] = " 150" )
( .50 [RETURN] = " 50" )
( [RETURN] = " 000" ) )

ARG5 = (EDIT SWITCH)

YES = CAN OMITT
NO = CAN'T OMITT

(THIS CAN BE OVERRIDDEN BY SETTING
EDITMODE = YES
OR
EDITMODE = NO
IN MAIN LINE CODE.)

ARG5 = HELP KEY
(SOMETHING I USE TO KEY ON HELP MESSAGES,
WHICH IS NOT INCLUDED HERE.)

ARG2$ = STRING VARIABLE USED FOR OUTPUT DATA FROM ACCEPT.



CALL: DISERR (ARG1%,ARG2$)

DESCRIPTION: DISPLAYS ERROR ON LINE 24 FROM TABLE OR ONE YOU INCLUDE IN CALL

ARGUMENTS: ARG1% = ERROR NUMBER
IF < 100 THEN DISPLAYS BASIC ERROR
IF > 100 AND < 200 DISPLAYS ERROR FROM TABLE
IF > 200 DISPLAYS ERROR STRING FROM ARG2$

ARG2$ = ERROR STRING TO DISPLAY IF ARG%1 > 200



CALL: ASKUM (ARG1$,ARG2$)

DESCRIPTION: DISPLAYS PROMPT ON LINE 24 AND WAITS FOR SINGLE KEYSTROKE

ARGUMENTS: ARG1$ = PROMPT STRING
ARG2$ = RETURNED INPUT



CALL: DISDATE

DESCRIPTION: DISPLAYS DATE AND TIME IN UPPER RIGHT HAND CORNER OF SCREEN

ARGUMENTS: NONE



CALL: DISPBIN (ARG1$(),ARG2$(),ARG3$())

DESCRIPTION: DISPLAYS NUMERIC VARIABLES

ARGUMENTS: SAME AS "DISPLAY"


CALL: DISPLAY (ARG1$(),ARG2$(),ARG3%)

DESCRIPTION: DISPLAYS ASCII VARIABLES OR HEADING ON SCREEN.
IF ARG2$()="" THEN ARG4 IN ARG1$1() IS DISPLAYED ELSE
DATA IN ARG2$() IS DISPLAYED.

ARGUMENTS: ARG1$() = ARRAY ELEMENT CONTAINING A 4 ARGUMENT STRING

ARG1 = LINE # (ZERO FOR NO LINE POSITIONING)
ARG2 = COLUMN #
ARG3 = FIELD DEFINITION
REV = REVERSE VIDIO
BLINK = BLINK
HIGH = HIGH INTENSITY


IF ARG2$()<>"" THEN

ALP = ALPHA
NUM = NUMERIC
DEC = DECIMAL

DATE = FORMATTED DATE OUTPUT "MM/DD/YY"
INPUT A 6 CHARACTER STRING,
USES 8 COLUMNS ON SCREEN.

TIME = FORMATTED TIME OUTPUT "MM:HH"
INPUT A 4 CHARACTER STRING
USES 5 COLUMNS ON SCREEN.

IF ARG2$() ="" THEN

ARG4 = ASCII STRING WHICH IS DISPLAYED

ARG2$() = ARRAY ELEMENT CONTAINING OPTIONAL DATA.
ARG3% = NUMBER OF LINES TO ADD TO ARG1
(ARG3% NORMALLY EQUALS ZERO, I SET THIS UP SO
I COULD DISPLAY MULTIPLE LINES WITHOUT CHANGING
THE ORIGINAL LINE VALUE IN ARG1 OF ARG1$(). )




 December 22, 2017  Add comments

Leave a Reply