home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windoware
/
WINDOWARE_1_6.iso
/
powerbbs
/
pbbsw155
/
powrmain.exe
/
POWRLANG.DOC
< prev
next >
Wrap
Text File
|
1991-05-28
|
13KB
|
405 lines
POWERLANG
────────────────────────────────────────────────────────────
PowerLang is a Basic Type of Language, which permits you to write your
own menu routines.
PowerLang files can be created by any text editor or word
processor which can edit standard text files.
PowerLang files are read line by line, and run just like a basic
program.
Here are the commands which are currently available in PowerLang:
Activity
--------
Structure: Activity "Info to be written to Activity Log"
Description: Writes info to the Activity Log. Info in quotes can
be no larger than 75 characters.
Examples: Activity "Added BBS to BBS Listed"
Activity "Loaded Viewage program"
Append
------
Structure: Append "Path/Filename to open file for Append"
Description: This command will open a file to write to. If the file
is not found, it is created. The Write_File command will
write to the end of the file. The file is NOT DELETED, the
data is written to the end of the file.
Examples: Append "Blt.Dat"
Append "BBS.Lst"
Append "D:\Powrbbs\Blt\Blt4"
ClearScreen
-----------
Structure: ClearScreen
Description: Clears the screen
Examples: Clearscreen
Close
-----
Structure: Close
Description: Closes the current open file (If a file is currently open)
Examples: Close
Dec
---
Structure: Dec [Integer Code] [Integer Code]
Dec TIME [integer Code]
Dec SAFE [integer Code]
Description: Decreases the integer. For example, if you do (Dec I1 I2), if
I1 = 12 and I2 = 5, I1 becomes 7 and I2 stands at 5.
You can Decrease the users TIME or SAFE by using this command.
Examples: Dec I5 I7
Dec TIME I1
Dec SAFE I1
Display
-------
Structure: Display "[Text to be displayed]"[;]
Display S1[;]
Display I1[;]
Description: Display sends text to the caller, and writes the info
on the local monitor.
Usage: Text in " can be anything BUT Quotes ('"').
If a Comma (';') is placed at the end of the line,
no return (C/R) is send and written on the monitor.
If no Comma is present, C/R is sent and written on
the local monitor.
To display a string or integer, just enter the code of
the string, integer.. You MUST include the S or I.
Examples: Display "Welcome to the FUN world of BBSing.. "
Display "Enter your name: ";
Display I1;
Display I1
Display S1;
Display S1
Dos
---
Structure: Dos "[Dos Command Line]"
Description: Shells to Dos, and runs the command in quotes (" ").
When the shell is complete, if the log file is found,
it is displayed and then erased.
Examples: Dos "Dir >|LOG|"
This will do a directory of the current location, and
send the output to the |LOG| file. The |LOG| file
is then displayed and erased.
Give_Value
----------
Structure: Give_Value S1 "This is what S1 will equal"
Give_Value I1 "300"
Description: Assigns the identification code (either string or integer)
a new value which is assigned in quotes.
Examples: Give_Value S9 "Welcome..."
Give_Value I1 "1"
If (EndIf)
--
Structure: If [!] [Flag #]
If [!] [Char #] = "Character to compare character # with"
If [!] I1 = I2
If [!] I1 > I2
If [!] I1 < 12
Description: The If statement, will check to see if the flag is true, or
if the character is equal to the character in quotes. If
the definition is true, all the commands after the If statement
will be run, until an EndIf statement is reached.
If statements for integers can compare different integer
values..
The ! is optional, and stands for Not. In this case, if the
definition is false, then the if statement is run.
Examples: If B1 (Use B and the number for flags)
Display "B1 = True"
Display "This statement is still run"
Endif
If ! B1
Display "B1 = False"
Endif
If C1 = "A"
Display "The Character #1 is equal to A!"
Endif
If ! C1 = "A"
Display "The Character #1 is NOT equal to A!"
Endif
If I1 > I2
Display "Integer I1, is greater than I2!"
Endif
If I1 = I2
Display "Integer I1, is equal to I2!"
Endif
If I1 < I2
Display "Integer I1 is less than I2!"
Note: You can place if statements, within an if statement.. Examples:
If C1 = "A"
If I1 < I2
Display "I1 < I2 and C1 = A!"
Endif
If I1 > I2
Display "I1 > I2 and C1 = A!"
Endif
Display "GoodBye!"
Endif
Get_Return
----------
Structure: Get_Return
Description: Forces the caller to type RETURN
Examples: Get_Return
Get_Choice
----------
Structure: Get_Choice [Ok_Char_String] [Char #]
Description: Forces the caller to keep inputing, until one of his
characters is contained in the OK_Char_String. The
Char # is given this value. The Char # can be from
1 - 25, and is understood as C and the number, such
as C1. C does not have to be present in this command.
Examples: Get_Choice YN 1
This command will wait until Y or N is pressed, and give
C1 the value which is pressed.
Get_Choice ABCDEFG 4
This command will wait until one of the letters A,B,C,D,
E,F, or G are pressed, and give C4 that value.
Get_Yesno
---------
Structure: Get_YesNo [Flag#]
Description: Forces caller to type Y or N.
If Y is pressed the Flag# given is assigned True
If N is pressed the Flag# given is assigned False
Usage: The Flag# is a number from 1 to 25 (NO higher, NO lower).
B can be placed before the number, but is not necessary in
this function. (It IS nessassary in other functions)
Examples: Get_YesNo B1
Get_Yesno B3
Get_Yesno 4
Goto
----
Structure: Goto [Line to move to]
Description: Goes to a certain line number. Lines designated for GOTO,
begin with :.
Examples: Goto END
:START
DISPLAY " This is Start "
:END
DISPLAY " This is End "
Inc
---
Structure: Inc [Integer Code] [Integer Code]
Inc TIME [integer Code]
Inc SAFE [integer Code]
Description: Increases the integer. For example, if you do (Inc I1 I2), if
I1 = 5 and I2 = 12, I1 becomes 17 and I2 stands at 12.
You can increase the users TIME or SAFE by using this command.
Examples: Inc I5 I7
Inc TIME I1
Inc SAFE I1
Input_String
------------
Structure: Input_String [Max String Length] [String #]
Description: Gets a string from the caller (Combination of any characters),
up the the Maximum string length. The Value of the String
Input is given to the String #.
Usage: The Input String Number, is a variable defined as S and the
number of the string which can vary from 1 to 15. You can
have up to 15 strings (S1-S20). In this function, only the
number of the string has to be given, since only strings
are outputted. The Maximum length a string can be is 50
characters.
Examples: Input_String 50 1
Input_String 25 2
Input_String 40 S3
Int_To_Str
----------
Structure: Int_To_Str [Integer Code] [String Code]
Description: The integer value from the integer code is assigned to
a string
Examples: Int_To_Str I1 S1
Int_To_Str I19 S5
Number_Input
------------
Structure: Number_Input [Number Format] [String #]
Description: Inputs a number-format, and sends input to the string #
defined. The Number Format is the same used in the
script questionnaires. In for Number Format, wherever a
# is placed, the caller must enter a number. Anything
else in the format, is just displayed to the user, and
also entered in the string #.
Examples: Number_Input (###) ###-#### S1
Number_Input ##-##-## S2
Number_Input ##/##/## S3
Return_To_BBS
-------------
Structure: Return_To_BBS
Description: Quits, and returns to PowerBBS
Examples: Return_To_BBS
Run
---
Structure: Run "[PowrLang Source Code Path/Name to Run]"
Description: Quits out of the current code, and runs the code specified
in the Run QUOTES. It quits the current code, and WILL
NOT COME BACK (Unless that source RUNs the current code again).
Usage: Run "EndOf.Pow"
Run "Menu.Pow"
Set_Flag
--------
Structure: Set_Flag [FLAG #] [YES/NO]
Description: Sets the flag # to either true (YES) or false (NO).
Flag # can be a number from 1 - 25.
Examples: Set_Flag B1 YES
Sets flag #1 to True
Set_Flag B19 NO
Sets flag #19 to False
Str_To_Int
----------
Structure: Str_To_Int [String Code] [Integer Code]
Description: The Integer value of the string is assigned to the integer
code
Examples: Str_To_Int I1 S1
Str_To_Int I19 S5
Type_File
---------
Structure: Type_File "[Path/Filename]"
Description: Types a file to the screen and to the caller.
Usage: In " " should be the path/filename of the file you
want to be typed to the caller and monitor. No "
should be present.
Examples: Type_File "C:\Powrbbs\Screen\Menu"
Type_File "D:\Fun"
Wait
----
Structure: Wait [MilliSeconds to Pause]
Description: Waits for the certain time in milliseconds.
1000 => 1 Second
Examples: Wait 5000 :: Pauses for 5 Seconds ::
Wait 200 :: Pauses for .2 Seconds ::
Write_File
----------
Structure: Write_File [String #][;] [/String Length]
Write_File "[Text to write]"[;]
Description: Writes Info to the current opened file. File must be
opened for REWRITEing, or APPENDing.
String # is the String #. If no ; is present, C/R is
entered in the file. If there is a ;, no C/R is present,
you can then use the / command. The /# will write the string
to the file, set in the number of strings. For example, if
you write S1 to the file and S1 = "516", but you want the
file to be cleared for the next data, you can use
Write_File S1; /4 which will write "516 ", instead of "516".
Info written in Quotes, will be written to the text file.
; places the same role as above. No / is supported.
Examples: Write_File S2
Write_File S2;
Write_File S2; /5
Write_File "516-873-8032"
Write_File "516-873-8032";