BBS: Inland Empire Archive Date: 05-30-92 (12:31) Number: 137 From: JEFF FREEMAN Refer#: NONE To: ALL Recvd: NO Subj: Jdibas 4/5 Conf: (2) Quik_Bas
This message was from JEFF FREEMAN to ALL,
originally in conference (V) V-TREK
and was forwarded to you by JEFF FREEMAN.
-------------------------
>>> Continued from previous message
FUNCTION MORE$ ()
This function displays the MORE prompt and returns the key pressed
by the user: Y for yes, N for no or C for Continuous.
FUNCTION NCase$ (Name$)
This function returns Name$ with the first letter of each word
in caps. For example: "mr brown" would return "Mr Brown".
SUB BackSpace (N)
This subroutine moves the cursor to the left N spaces.
SUB CloseDoor ()
This subroutine should be called rather than END, STOP or SYSTEM.
SUB HitAKey ()
This subroutine displays the Hit-a-Key prompt and waits for the
user to press a key.
SUB JBeep ()
This routine beeps just like BEEP.
SUB JCls ()
ALWAYS use JCls, NEVER use CLS. Otherwise it has the same affect.
SUB JCenter (T$, CRLF)
This sub displays T$ centered on the current row. It is followed
by a carriage-return/line feed if CRLF is true.
SUB JColor (Fc, Bc)
This routine changes the color just like COLOR -- but the color
codes are not the same as BASIC's color codes. JDI has declared
the necessary constants so that you may call JColor like so:
JColor Red, Black 'red foreground, black background
JColor Red+Bold, Black 'hi-red foreground
JColor Yellow + Bold + Blink, Black 'Blinking hiYellow fore.
SUB JInPut (P$, IN$, W)
Displays P$ and accepts the user's input into IN$. W is the number
of characters to accept. If W is 0, then JINPUT uses hot-key input
and doesn't echo what the user enters. If W is a negative number,
the JInPut will hit return for the user when the maximum number of
characters is approached -- affectively simulating word-wrap. For
example:
JinPut "Name: ", Name$, 25
This will prompt the user with "Name: " and accept up to 25
characters, which are returned in Name$
SUB JLines (L)
This routine moves the cursor down L lines.
SUB JLocate (R, C)
This works just like BASIC's LOCATE command. NEVER use LOCATE.
This moves the cursor to row R, column C.
SUB JOpen (F$, Mode$, FileNum, RecLen)
Always use this, never use OPEN. JOPen uses the same format as
OPEN. Therefore instead of:
OPEN "MYFILE" FOR RANDOM AS #1 LEN = LEN(MyRecord)
:
GET #1, RecNum, MyRecord
:
CLOSE 1
You would use:
JOpen "MYFILE", "R", FNum, LEN(MyRecord)
:
GET #FNum, RecNum, MyRecord
:
CLOSE FNum
JOpen will find the next file number and assign it to FNum, so
you needn't worry about which file numbers are currently available.
RecLen ( LEN(MyRecord) in the example ) is not required for INPUT,
OUTPUT or APPEND file modes. You may send a 0 in that case (you
cannot, however omit the variable altogether).
Valid modes are:
"I" INPUT
"O" OUTPUT
"A" APPEND
"R" RANDOM
"B" BINARY
If you attempt to open a file for input that doesn't exist, Jopen
returns a zero for File Number. Save time by checking to see if
the file exists AFTER you JOPEN it.
SUB JPrint (T$, CRLF)
NEVER use PRINT, always use JPrint. This sends T$ to the screen
and the modem. If CRLF is TRUE, then JPrint follows with a
carriage-return/line feed. For example:
JPrint "Print this on my screen.",False
is the same as
PRINT "Print this on my screen." ;
SUB OpenCom (ComPort, Baud&)
This is an internal function used by JDI to initialize the com
routines. You could write support for other drop-file formats
by reading the info, assigning the appropriate user variables,
and then calling OpenCom with the COMPORT and BAUD&. JDI
supports COM's 1-4 and Baud& up to 115,200.
SUB OpenDorinfo (DF$)
This routines is passed the path and filename to DORINFOx.DEF.
It sets up the user variables such as caller name, BBS Name, etc.
and calls OpenCom to initialize the modem routines.
SUB ViewFile (F$, MorePrompts)
ViewFile will display the file F$ if it exists. For ANSI users
ViewFile will check for a .ANS version of the file. If there is
no .ANS version, or if the user is a non-ansi user, then ViewFile
will display the .ASC version. MorePrompts should be true if you
want the user to be prompted with the MORE prompt every 23 lines.
ViewFile "MYFILE", False
will display MYFILE.ASC to non-ansi users, or MYFILE.ANS to ANSI
users.
These are the variables and their uses. Note that they are in a data type,
so that JDI.BBSName is the name of the BBS, JDI.SysopName is the name of
the sysop, etc.
TYPE JDIType
BBSName AS STRING * 25 'name of BBS running door
SysopName AS STRING * 25 'name of sysop
PlrName AS STRING * 25 'name of current player
Sysop AS INTEGER 'True if player is the sysop
ANSI AS INTEGER 'False if player doesn't have ANSI
SecLevel AS INTEGER 'player's security level on the BBS
AllCaps AS INTEGER 'force input from user into all caps
MoreFc AS INTEGER 'foreground color of more prompt
MoreBc AS INTEGER 'background color of more prompt
MoreMsg AS STRING * 30 'the more prompt
Pauses AS INTEGER 'False = No more prompts
HitKeyFc AS INTEGER 'foreground color of hit-a-key prompt
HITKeyBc AS INTEGER 'background color of hit-a-key prompt

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET