home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
bbsfiles
/
vbbs531.arj
/
VSCRIPT.DOC
< prev
next >
Wrap
Text File
|
1991-11-29
|
33KB
|
1,025 lines
The Vscript script language
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The script languange itself has some similarities to REXX. A script
is composed of lines of pure ASCII text that can be written using
just about any word processor in ASCII mode.
A few features of the language are:
-Scalar variables which can be used for storing numbers, strings, characters
-Numeric and String operators
-Commands supporting various types of serial input and output
-Built-in database/data buffer commands
-User account modify sysop-defined fields commands
-Commands which provide functions for a multi-user system
-Transfer control, subroutine, relational testing/branching
-Chain execution to another script
-Definable Break processing
-SHELL to DOS capability
-Compiled Script Language (Loads and Executes Faster!)
-FINDFIRST and FINDNEXT commands for searching DOS directories
-Automatic ANSI control
-Up to 20 time-programmed events per day
-VBBS releases all RAM before running DOORS and Events, freeing up more
space for your other programs and multitasking.
A simple excersize in modifying a script might begin in Start.V
with a customized new user letter from the SysOp. Where you see "We hope
you find your stay here enjoyable", you will notice that it is preceded
by a BUFFER APPEND command. Using the same structure you may easily add
additional lines to the letter. Once you have done this, you simply type
Vcom start.v and your modified script will be compiled. You may go
through the scripts and change lines of text, add or change colors though
the the use of color commands ($blue, $green $magenta etc), and just
experiment. Note that the ! character is the comment character and
anything following ! within the script will be ignored.
The SCRIPT Language
~~~~~~~~~~~~~~~~~~~~~
VBBS comes with a COMPLETE set of scripts -- you can set up and run your
new VBBS in a matter of minutes. The script language is a very powerful part
of VBBS that gives it truly amazing flexibility. It is easy to
included scripts (and design new ones ), a thorough
explanation follows.
First off, a script is nothing more than an ASCII text file containing your
commands, one per line. When your script is compiled, parsed ("tokenized")
and coded into a binary form which loads and executes much faster. When it
is executed, the coded form is loaded entirely into memory.
The definition of a TOKEN under VBBS is very important. The commands
use these tokens are their parameters.
A token is defined as:
1. Any unspaced string of characters,
or
2. Any string surrounded either by single quotes or double quotes.
(So that you can embed spaces in strings.)
Of course, the outside quotes are NOT actually a part of the string.
(This definition of a token is very similar to that for REXX.)
As you can surmise from the definition, spaces are used to delimit words,
with quotes as an over-ride.
Up to seven tokens may be specified per line. With the exception of
the assignment statement, the first token in the line must be a script
command. Tokens may be either string literals or script variables.
The VBBS script language is NOT CASE-SENSITIVE. (Capitalization used in
this text is not required and is done only for clarity.)
Scalar variables in the VBBS script language begin with a $ character. All
variable data is stored as string data, even numeric data. Numeric data is,
however, temporarily converted to binary single-precision form for computations.
Assignment to variables is done with the = character. For example:
$test = 1 {Loads the string '1' into the variable $test}
$test = "1" {Exactly equivalent to $test = 1}
$greeting = "Hello" {Sets variable $greeting to 'Hello'}
There are several numeric and string operators. You may only use operators
in assignment statements, and you may do up to two operations per line
(because of the 7 token per line maximum).
+ Addition
- Subtraction
* Multiplication
/ Division
$test = $value * 10 {Multiplies the contents of $value by 10
and stores the result in $test}
$test = $value - $loss {Subtracts the value of $loss from $value
and stores the result in $test}
$test = $count - 1 * 100 {Takes value of $count, subtracts 1, then
multiplies by 100 and stores the result in
$test}
& String Concatenation
$test = "Welcome Back, " & $name
In addition to above, there are a few of built-in functions.
Syntactically, though, they look more like operators. Actually, the
way they were implemented is "Quite Illogical, Captain."
But it was done this way for speed, and it works!
INT Chops off the fractional part of a number.
$test = $value INT 0 {Takes the value of $value, chops the fractional
part and stores the result in $test. The 0 is a
dummy placeholder, and is REQUIRED}
$test = $count * 10 INT 0 {Takes the value of $count, multiplies by 10,
then chops the fraction and stores the result
in $test}
RND Generates Psuedo-random numbers in a specified range.
$random = 1 RND 10 {Generates a random number between 1 and 10, inclusive}
UPPER Returns the upper-case equivalent of a string.
$test = "abc" UPPER 0 {Converts abc to upper-case, puts the result in $test
Note the dummy 0 placeholder}
ASC Returns the ASCII code of the first character in the string.
$test = $string ASC 0 {Computes the ASCII code of the first character
of the contents of $string, stores in $test}
CHR Returns the corresponding string character, given the ASCII code.
$test = $code CHR 0
INSTR Scans a string for a given substring. Returns 0 if not found.
Returns position of substring otherwise.
$position = $mainstring INSTR $substring
LEN Returns the length of a string.
$length = $string LEN 0
$length = "hello" LEN 0
LEFT Returns the leftmost number of specified characters.
$leftpart = $string LEFT 4 {Returns leftmost 4 characters of contents
of $string}
MID Returns a substring from the middle of a string to the end.
$midpart = $string MID 5 {Returns all characters from position 5
to the end of the contents of $string}
$extract = "123456789" MID 3 LEFT 4 {In this example, two operations are
performed. First, the MID is done,
returning 3456789. Then LEFT is
applied returning 3456, the final
result.}
SQR Returns the square root of a value.
$root = $value SQR 0
==*==
Display/Serial I/O Commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RS <variable> <prompt>
Transmits optional prompt and reads a line of input into a variable. Input
is echoed character by character, and terminates with a carriage return.
The length parameter limits to the length of the input line.
RS $name "What is your Name?"
RX <variable> <prompt>
Transmits optional prompt and reads a line of input into a variable.
X's are echoed as characters are input. Input terminates with a
carriage return.
RX $newpassword "What is your new password?"
RW <variable> <prompt>
Transmits optional prompt and reads a line of input into a variable.
Input is echoed character by character, and WORD-WRAP is taken care of
automatically. Input terminates with a carriage return, or when the
line limit is reached. In the case of the line limit, the "broken" word
on the end is removed from the string and stored internally for the next
use of RW and the remaining line is stored in the script variable.
Use RW as the input command for message and text editors.
RW $line ">"
RN <variable> <prompt>
RN is a lot like RS except it should be used to read numeric input.
RN will not allow bad characters or too many digits to be input.
RF <variable> <prompt>
RF is similar to RS execpt it should be used to get filename input.
It will not allow a user to enter an invalid filename.
RC <variable> <prompt>
Transmits optional prompt and waits for the user to press a key.
The key is stored in the variable, but is not echoed.
RC $char "Your Command? "
RR <variable> <restricted character list> <prompt>
Transmits an optional prompt and waits for the user to press a key.
Keys not in the "restricted character list" are ignored.
The keystroke is not echoed. Not case-sensitive.
RR $key ABCD "Select: A, B, C, or D. "
RL <variable> <restricted character list> <numeric limit> <prompt>
RR works with a restricted character list. RL uses a restricted character
list and a numeric range in forming user input. The low end of the rnage
is always 1. The high end of the range is the <numeric limit>.
For example:
RL $var Q 20 "Please Select 1-20, Q to Quit:"
Allows input of character Q or number between 1 and 20.
RL is very flexible and very handy. For more exmaple of use, see the
scripts.
RI <variable> <prompt>
Much like RF, except it allows wildcard filenames.
TR <token 1> <token 2> ... <token 6>
Automatically concatenates all of the tokens you specify
(both contents of variables and literals) and transmits the string
with a Carriage Return and Linefeed appended.
TR "Welcome back to the BBS!"
TR "Hello " $name ", how are you doing today?"
Additionally, optional output formatters can be used to make your numeric
and string variables print neatly.
TR %s20 $s <= Variable $s, left justifies, pads to 20 length
TR %i4 $i <= Variable $i, formatted to a 4 digit integer.
TR %d3.2 $d <= Variable $d, formatted to a decimal with form ###.##
TS <token 1> <token 2> ... <token 6>
Same as TR except no Carraige Return/Linefeed is appended.
PAUSE <optional prompt string>
If no string is specified, uses the default set-up by VCONFIG.EXE.
Transmits the prompt, waits for any key, then back-spaces over the prompt.
==*==
Database Commands
~~~~~~~~~~~~~~~~~~~
DBGROUP <group identifier>
Before you can execute the DB command, below, you must select a
database group. Grouping was implemented so that it would be much
easier to implement global functions and so that databases may be added
and deleted (using VCONFIG.EXE) without the need to edit the scripts
every time. The <group identifier> is a single identification character.
A to Z recommended.
When you execute a DBGROUP command, the special variable $DBNUMBER
is loaded. It contains the number of databases in the group. The first
database in any group is number 1. This makes it easy for a script
to do global operations by using these lower and upper limits in a loop.
The special variable $DBGROUP is loaded with the group id. Since LINK
clears normal variables, $DBGROUP could be used to pass group select
information to another script.
How you group your databases is up to you. An example might be:
A for public message bases
F for public file bases
E for private Email & private bases
O for other databases (custom, imaginative database uses...)
DB <database #>
The DB commands sets the current database for use. You must select a
database using this command somewhere in your script before any of the
other database commands (except DBGROUP) are used. Once you set the
database, it stay's set until another DB command is executed. Also, the
database must have been defined previously using VCONFIG.EXE.
When a DB command is executed, "special" read-only variables
are automatically loaded:
$DB - The <database #> you specified. Use for passing this info to
other scripts when using the LINK command.
$DBNAME - The long name of the database.
$DBPATH - The path where database is located.
$DBFILE - The database filename.
$HIGHDB - This is the user's highest-database-entry-read quick-scan pointer.
$NUMBERDB - Number of entries in the database.
$WRITESL - The database's write security level.
LOAD <entry number> <option>
This command loads a database entry into special variables:
$FROM - The handle of the person who created the entry.
$FROMNO - The User # of the person who created the entry.
$FROMNODE - VirtualNET node number of sender.
$TO - The handle of the addressee, if any.
$TONO - The User # of the addressee. 0 if to ALL.
$TONODE - VirtualNET node number of addressee.
$SUBJECT - The subject of the message, or brief description for a file.
$ORIGIN - Origin - Optional - Use for BBS Tag Line, etc.
$ATTFILE - Filename of 'attached' file, if any. Useful for DOWNLOAD command.
$SIZE - Size of attached file. If no file, set to 0.
$DBFLAG - Use is optional. Can be used as a message received flag
or any other desired purpose.
$DBCOUNT - Use is optional. Can be used to count replies or
# of downloads, or any other desired purpose.
$DBTIME - Creation time of entry.
$DBDATE - Creation date of entry.
Plus an additional variable called $RESULT. This is the result of
the LOAD operation. Returns:
DEL if entry is marked as deleted,
OUT if entry number is out of range,
PRI if PRIVATE database, and user is not sender, addressee, or
SYSOP/Co-SYSOP (access with security level 250 or greater),
OK otherwise.
In addition to loading the special variables, LOAD also transfers
the memo file contents for the entry to the BUFFER and updates the
user's quick-scan pointer, unless you specify /Q for <option>.
A typical use of the LOAD command to read messages might go like this:
Use LOAD to load the entry (do NOT specify /Q option>
Test $RESULT
If OK, then use TR command to transmit the header data however you desire,
and use BUFFER LIST to display the memo line data.
A typical use of the LOAD command to scan message titles might go like this:
Use LOAD to load the entry specifying the /Q option
Test $RESULT
If OK, then use TR command to transmit the header data however you desire.
DEL <entry number>
Marks an entry for deletion. This command, also, returns a result
in the special variable $RESULT. Returns:
OUT if entry number is out of range,
PRI if the user is not sender, addressee, or SYSOP/Co-SYSOP.
OK otherwise.
PACK
Pack removes records which have been marked for deletion, and re-sequences
the database. It also updates user and network quickscan pointers.
ADDCOUNT <entry number>
Adds 1 to the $DBCOUNT field of the entry number specified.
DBFLAG <entry number> <switch>
Sets or Resets the $DBFLAG field of the entry number specified.
<switch> is either ON or OFF.
SEARCH <entry number> <key> <string>
Searches the database, starting at the entry number specified.
<key> is either:
1 - Search TO field
2 - Search FROM field
3 - Search SUBJECT field
4 - Search FILENAME field (wildcards allowed)
5 - Search FILENAME field (wildcards not allowed)
If <key> is 3, 4, or 5, then <string> is data to search for in field.
SEARCH returns two results:
In $RESULT, OUT if not found,
OK otherwise.
In $SEARCH, the entry number where the search data was found.
QS <entry number>
Manually change the user's quick-scan pointer to the entry number specified.
SAVE <to user #> <subject> <origin> <size> <attached filename> <to node #>
Saves a database entry:
Header Information (the parameters on the line with SAVE).
Saves Memo Lines (the current contents of the BUFFER).
<to user #> User # of addressee. If TO ALL, use 0.
<subject> Data for subject field.
<origin> Data for origin field.
<size> Size of attach file, if any. Use 0 if none.
<attached filename> Filename of attached file, if any.
<to node #> VirtualNET Node # of addressee.
The new entry header info is saved at the end of the current database file.
The BUFFER part is saved in a binary file and indexed (for speed).
There are two other variants of the SAVE command: RESAVE and XSAVE. They
both take the same command line parameters as SAVE. They are different in
the way they handle the $FROM, $FROMNO, $FROMNODE data. When SAVE executes,
it saves the database entry as being from the user who is currently on-line.
XSAVE saves the database entry as though it were from the SysOp. (XSAVE is
useful is want the system to automatically generate messages from you to
them.) RESAVE is different. RESAVE was implemented so that database entries
could be edited by the SysOp, with losing the original "from user" data.
It would work like this: use LOAD to load the entry, edit it by editing the
contents of the BUFFER, and then use RESAVE to save it out. RESAVE
essentially saves a database entry, preserving the original "from user"
information.
==*==
File Transfer Commands
~~~~~~~~~~~~~~~~~~~~~~~~
** Note: To use the file transfer commands, you must **
** have DSZ.COM, an external protocol driver. **
** DSZ version 04-11-90 or newer is recommended! **
DOWNLOAD <path\filename>
Prompt user for desired protocol (as they have been set up using VCONFIG)
and then sends a file to the user. You may include a full path specification
along with the filename.
UPLOAD <path\filename>
Just like DOWNLOAD except receives a file from a user.
BATCH
Brings ups the batch functions handling routine.
REMOTEUPLOAD
Allows user to upload one or more files to the SysOp Review Directory.
LISTFILES
Prompts for a file mask (can include wildcards), and lists all files
in the current selected (DB) database.
SEARCHALL
Prompts for a file mask (can include wildcards), and lists all files
in the each database for the current selected (DBGROUP) database group.
NEWFILES
Lists all NEW files, all databases in the current DBGROUP.
FINDFILES
Searches the description, all databases in the current DBGROUP.
SYSOPUPLOAD
Local SysOp Upload.
REVIEWUPLOADS
Allows Sysop to Review new uploads.
REVIEWFILE
Review/download files sequentially by file number.
DOWNLOADFILE
Review/download files by wildcard filename mask.
RATIO
Displays User Ratio.
TOPDOWNLOADS
Display List of Most Popular Downloads.
==*==
High Level Communications Functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SENDEMAIL
Send Email to another User.
FEEDBACK
Send Email to the SysOp.
READEMAILTO
Read all Email to User.
READEMAILFROM
Read all email from User.
READALLEMAIL
SysOp read all mail on system.
SETQUICKSCAN
Set database in current DBGROUP join/ignore during newscan.
LISTBASES
Lists the databases in the current DBGROUP.
SELECTBASE
Select a database from the current DBGROUP.
PREVBASE
Switch to the previous database.
NEXTBASE
Switch to the next database.
READSEQMSG
Read messages, sequentially.
READNEWMSG
Read new messages in all selected databases.
SCANMSG
Scan the current database.
POST
Write a message in the current database.
QUICKMAIL
Use the MultiMail Functions.
==*==
BUFFER Commands
~~~~~~~~~~~~~~~~~
BUFFER CLEAR
Clears out the BUFFER.
BUFFER APPEND <text>
Appends the line of text to the BUFFER.
BUFFER LIST
Transmits the current contents of the buffer.
Strips ANSI from the buffer if the online user's ANSI preference is
turned off.
BUFFER CHANGE <old text> <new text>
Global change <old text> in the BUFFER to <new text>.
BUFFER EDIT
Starts up the built in line editor.
BUFFER FULLEDIT
Starts up the built full screen editor.
BUFFER SAVE <filename>
Saves the contents of the buffer into a sequential file.
BUFFER LOAD <filename>
Loads the buffer from a sequential (text) file.
BUFFER QUOTE
Sort of like BUFFER CLEAR, but allows user to "quote" up to 20 lines
from the previous post (which are still in the buffer). After the lines
have been selected by the user, they are saved in a temporary space.
the BUFEFR is CLEARed, and the quoted lines are put back into the beginning
of the buffer, preceeded by a >.
==*==
Other Main Functions
~~~~~~~~~~~~~~~~~~~~
TEXTFILES
Brings up the text files (bulletins) functions.
DOOR
DOOR can be used with two different syntaxes:
When used by itself, it brings up a list of DOOR programs
which can be run, as configured by VCONFIG, Doors
configuration. If a door is selected, the door info files
CHAIN.TXT, DORINFO1.DEF, and DOOR.SYS are written to disk.
Then the door is executed, with VBBS shrinking out.
When used with a parameter, (as in DOOR "RUN-ME"),
the door info files are written, and the door is run
immediately.
AUTOPOST
Brings up the autopost functions.
EDITFILE
Allows Sysop to edit a text file. (200 line limit)
SYSINFO
Displays the systsem information screen.
CLEANUP
Packs all of the databases.
VOTE
Brings up the voting booth functions.
CHECKVOTE
Tells user if new polls exist, and takes them to the voting booth if so.
RANDOM
Pulls up a random blurb from your random blurbs files and displays it.
ACCOUNT
Brings up the account defaults set-up and allws the user to change them.
LISTNET
Brings up the network listings functions.
==*==
Sequential File I/O
~~~~~~~~~~~~~~~~~~~~~
OPEN <filename> <access>
<access> is INPUT, OUTPUT, or APPEND.
CLOSE
Closes file previous opened with OPEN.
READ <var>
Reads a line of input text from the file.
Returns !EOF! if the end of file has been reached.
WRITE <token1> <token2> ... <token7>
Writes a line of text to the file.
==*==
Mutli-User Support
~~~~~~~~~~~~~~~~~~~~
WHO
Who else is on-line? Lists port #, user #, handle, current BBS activity.
ACTION <text>
Sets the user's current BBS activity for the WHO command.
TELECON
Enter the VBBS Teleconference Mode.
==*==
Transfer/Control Commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~
# <label>
Defines a label line.
GO <label>
Go to the label specified.
CALL <label>
Call a subroutine located at <label>.
RET
Return from a CALL command.
TEST <token1> <relation> <token2> <label>
Perform a non-case-sensitive string comparison and go to <label> if true.
<token1> and <token2> may be either variables or constants.
<relation> is one of the following:
<> Not equal
= Equal
<= Less than or equal
>= Greater than or equal
< Less than
> Greater than
TESTVAL <token1> <relation> <token2> <label>
Perform a numeric comparison and go to <label> if true.
<token1> and <token2> may be either variables or constants.
<relation> is the same as for TEST.
LINK <script filename>
Chain to a new script file. All old variables are cleared before the new
script starts executing. It is recommended that your break your scripts
into small modules and use LINK to jump from one script to another.
LINK does not clear the global variables, $GLOBAL0 to $GLOBAL29, or any of
the special read-only variables. NOTE: The script filename should be
a name of 8 characters or less and not contain an extension.
SHELL <text>
Shell to DOS, executing <text> on command.com startup.
When the shell process is finished, control returns to VBBS and
the script processor.
BREAK <label>
Specifies the label to branch to if Ctrl-C is detected. To turn off
Ctrl-C checking, issue a BREAK OFF command.
==*==
User Data Commands
~~~~~~~~~~~~~~~~~~~~
SETFLAGS <flag> <switch>
These are optional, sysop-defined general purpose flags.
<flag> is a character from A to Z. <switch> is ON or OFF.
When a user logs on, the special variable $FLAGS is automatically loaded.
SETEXTRA <extra #> <text>
There are 9 extra 16-character fields for your use.
<extra #> is 1 to 9. <text> is text to write into the data field.
When a user logs on, the special variables $EXTRA1 to $EXTRA9
are automatically loaded. More special variables, loaded at login-time:
$SECURITY - User's security level. 250 and up is considered
Co-sysop/Sysop access. Use TESTVAL and this variable to
implement your own security.
$NAME - User's real name.
$TITLE - SysOp-Defined field.
$HANDLE - User's handle.
$USER - User's account number.
$TIMESON - Number of logons
$TOTALMIN - Total number of minutes on since account was created.
$TIMEON - Number of minutes on for this session.
$TIMELEFT - Number of minutes left for this session.
$MAXTIME - Maximum minutes per day.
$ANSI - Contains ON or OFF depending on user's selection of ANSI.
$PAGE - Number of lines to print before pause.
==*==
Miscellaneous Commands
~~~~~~~~~~~~~~~~~~~~~~~~
LISTUSERS
Lists out all user accounts.
SECURITY
Lists out all user accounts with:
Security lvl > 150 or non-zero Group Code
KILL <filename>
A clean way to delete a file.
CHECKFILE <variable> <path/filename>
Stores size of file into variable. If file is non-existant, returns 0.
JR <variable> <size>
Right-justify the contents of a variable, padding with spaces.
JL <variable> <size>
Left-justify the contents of a variable, padding with spaces.
JC <variable> <size>
Center-justify the contents of a variable, padding with spaces.
EF <path/filename>
Transmits the contents of the text file.
LOG <text>
Write text to the BBS log file, BBS.LOG.
LOGOFF
Terminates script execution and logs the user off.
LOGOFFYN
Much like LOGOFF, but prompts for confirmation first.
BEEP
Beeps the PC speaker. Useful if you want a "Page the SYSOP" feature.
! <comment line>
A ! at the beginning of a line denotes a script comment line.
These lines are ignored by the VBBS script loader/parser.
USEREDIT
The USEREDIT script command lets the sysop do remote user editing.
MENU <filename>
Transmits file <filename>.ans is user has ANSI, <filename>.asc otherwise.
If ! is the first character of the line, VBBS interpets this as
"don't print this line unless the user's security level is greater
or equal to the immediately preceeding three-digit number."
Examples:
!255 S) SysOp Menu <== Line not printed unless the user has SL >= 255.
!100 F) Forward <== " " " " " " " " " 100.
ADDKEYS <variable> <keys to add> <min. security level>
Concatenates a string to the variable specified, if the user's
Security Lebel is greater than or equal to the msl specified.
FINDFIRST <variable> <mask to search>
Searches the DOS Directory, for the first file to match the mask
specified.
FINDNEXT <variable>
Finds the next matches after a FINDFIRST. Will return a null string ""
when the search has ended.
NEWPAGE
Resets the "Pause on screen" line counter.
PAGESYSOP
Pages the SYSOP BEEPER is Scroll Lock is activated.
More Commands:
~~~~~~~~~~~~~~~
The DO LOOP:
In this form, the variable loops from start to end.
DO <var> = <start> <end>
[body of loop]
LOOP
In this form, DO performs while a specific variable is non-zero.
DO WHILE <var>
[body of loop]
LOOP
IF-THEN-ELSE-ENDIF:
IF <expr> <relation> <expr> THEN
[then-code]
ELSE
[else-code]
ENDIF
IF <expr> <relation> <expr> THEN
[then-code]
ENDIF
Use IFVAL to test numeric relationships.
Relations are the same as for TEST and TESTVAL.
A few miscellaneous special variables:
$DATE - Current system date.
$TIME - Current system time.
$PORT - Port Number.
$BAUD - Baud Rate of Connection.
$NODE - Your system's VirtualNET node number as defined by VCONFIG.EXE.
$BBSNAME - Name of BBS as defined by VCONFIG.EXE.
$SYSOP - Name of SysOp as defined by VCONFIG.EXE.
$AVAILABLE - SysOp Available. Contains Y or N.
A few miscellaneous special constants:
$CLEAR - Set to Ctrl-L (ascii code 12) when ANSI is OFF, Otherwise set to
the ANSI clear screen command.
$CR - Carriage Return (ascii code 13).
$LF - Linefeed (ascii code 10).
$BS - Back Space (ascii code 8).
$BELL - Bell (ascii code 7).
$CRLF - Carriage Return and Linefeed.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The Database
~~~~~~~~~~~~~~
The database can be used for a lot of different purposes. You can store
messages, file descriptions, or even messages with attached files.
Also, there is no reason why you can't redefine the fields and use them
for other types of data storage.
There are two parts to each database entry; The HEADER INFORMATION, and
the MEMO LINES. Header info is data like sender's name, subject,
addressee, etc. Memo Lines are the actual body of the entry.
They are the message text or long file description, dpending on how you
are using the database.
Each database must reside in it's own hard disk sub-directory.
In addition to the file which holds the header info, and the text files
which hold the memo lines, there are two other files. One stores
user quick-scan pointers. The other stores network quick-scan pointers.
Using the BUFFER is an integral part of the database system. The BUFFER is
really nothing more than a RAM array of strings which holds work
in-progress. You can use the BUFFER commands to build your own Editor.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
Compiling Scripts with VCOM.EXE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VCOM.EXE is the Virtual BBS/NET script language compiler. VCOM expects the
source code file for the script to have a .V extension.
During compilation, VCOM generates two files for the script:
.LIT file: The literal data from the source code.
.COD file: The actual program in numeric integer-coded form.
If your script is called MAIN.V, then the command line to compile the
script would be:
VCOM MAIN
And the compiler will generate MAIN.LIT and MAIN.COD.
The compiler will trap any GO, TEST, TESTVAL, CALL, or BREAK commands which
do not have a valid destination label. You will have to fix the error and
compile again. This error message may also appear if there is a syntax error
in the GO/TEST/TESTVAL/CALL/BREAK command line.
It will also trap any attempt to use duplicate line labels.
Include Files Compiler Directive
Also, you may "include" other .V files in the compilation of your scripts.
That way, you can write a common routine once, and use it with other script
modules without the need to type (or cut/paste) the code into the modules
by hand. The include directive is & and it must be the first character
on the line. It must be followed by a space, and then the filename of
the file to include. Example:
& editor.v
-=-=-=-=-=-=-=-=-=-=-=-=-=-
For further discussion of Vscripts and access to modifications,
modified and additional Vscripts, please join us on the VirtualNET
Vscripts sub board and the VirtualNET networked Vscripts and Source Mods
Networked File listings.