Tab
- Special Characters
Identifiers
- No spaces.
- Can contain only lower case alphabetic (a-z) and characters.
Operation Symbols
- Arithmetic
o TIMES Multiplication
o DIVBY Division
o PLUS Addition
o MINUS Subtraction
- Logical
o @ AND
o % OR
o ~ NOT
- Relational
o : Equal to
o <: Less or Equal to
o >: Greater or Equal to
o << Less than
o >> Greater than
- Assignment
o TAKES Equal
Keywords
- Rules
o Should be always be in UPPERCASE
o Can be used as a variable name, but should be in lowercase
o No spaces between, should be used as is
- Reserved Words
o VOICEOUT For output
o VOICEINTO For input
o TAKE Specifies a subprogram to be included in the program, should be used
with $
o VAR Defines the data types integer, float, char, double
o START Specifies the beginning of the main program or statements.
o EXECUTE Provides iteration. Statements within will be executed repeatedly,
should be combined with UNTILto specify. // Do While
o UNTIL Provides iteration. Statements within will be executed repeatedly.
Contains the expression when to stop instructions within EXECUTE. //while w/ limit
o DURING Executes instructions during or while the specified expression is true.
//while
o FINAL Similar to default and else, instructions within will be executed if
preceding expressions or premises are not true. // else
o BETWEEN Short version for checking if a specified value is within a given range
(both exclusive).
o TAKES Assigns a specified value to a specified variable. // equal declaration
o SKIP Will skip all succeeding statements, useful in iterations. //Continue
o END Specifies the end of main program or statements.
Remarks
Fixed Format
- Importing
o Dollar sign followed by TAKEthen then filename string
o Filename should start with alphanumeric and should contain only one period for
extensions, not with any other symbol.
o Should be only done before theSTART keyword
$TAKE “<filename.extension>”
All formats beyond and below this lineshould be only done within the START and END keyword
- Declaring =
o Datatype must be typed first followed by a low line (_) then the desired name.
o Immediate initialization allowed
VAR_fltPriceTAKES 0.0 ::variable name is fltPricewith value 0.0
VAR_Name ::variable name is Name with no value
- Initializing
o Variable name followed by TAKESthen desired value
fltPriceTAKES 5.00
Name TAKES ‘a’
- Incrementing
o Variable namefollowedby PLUSthen the rate or value of increment
ScorePLUS5
- Decrementing
o Variable namefollowedby MINUS then the rate or value of decrement
Score MINUS 5
- Commenting
o For Block Commenting-| |-
A hyphen-minus sign (-) followed by vertical line (|, not ‘L’) and vice versa to
close
-|this is a comment
another comment
another comment
|-
o For Single Line::
Two colons
::Summer Boy
::Very Easy
- Escaping
o Makes specified symbol to be printed as is,using number sign #
VOICEOUT “Hello #NLINE World!”
VOICEOUT “#”Time is Gold.#””
- Printing values from variables
o Using number sign #to extract value from variables
VOICEOUT “Hello #name”
VOICEOUT “Price is #fltPrice”
- Scanning
o Using VOICEINTO
VOICEINTO <var1>,<var2>,<varN>
- Printing
o Using VOICEOUT
VOICEOUT“My name is #myName. #NLINE”
VOICEOUT“My name is Pedro. #NLINE”
- Conditional Statements
o Using question mark ? and FINALreturns true or false
<expression1> @ <expression2> % <expressionN>?<
VOICEOUT “Less than 5”
>
FINAL<
VOICEOUT “Greater than 5”
>
- Iterations
o Expressions placed should be declared and initialized first
o EXECUTEand UNTIL
EXECUTE<
<statements>
>UNTIL[<expression1> @ <expression2> % <expressionN>]
o Using DURING
DURING[<expression1> @ <expression2> % <expressionN>]<
<statements>
Delimiters