Function Limit per Program File
Only one function per program file
Other programs can be called as many as you want
Preprocessors Directives
#define K_ESC
27
// Only #define constant
Local Variables
// Each variable name must be unique and not a subset of
other
// zThisIs and zThis are not supported, Vouch parser is a confused
parser
// Declaration in one line separated by commas
local zAbc, z123
// Initialization in another
lines
zAbc := 123
z123 := afill( array( 10 ), 0 )
// While initializing use different line for each variable, though
comma separated syntax is supported
zAbc := 0, z123 := array( 10 )
// Clipper/xBase++ uses semicolon for single line multiple
assignments. Vouch uses commas.
Static and Public Variables
Declaration of these variable types is not allowed. However
Vouch provides a set of pre-defined public variables which are not
used by Vouch itself. There are 40 variables in this category,
pz1, pz2, pz3, ... , pz10
wz1,
wz10
xz1,
xz10
yz1,
yz10
which can freely be used in Vouch programs. Please note that these
variables are not thread safe (xBase++).
Loops
// It is perfectly right in Clipper/xBase++
local lMore, zNum
lMore := .t.
zNum := 212
do while .t.
if zNum > 313
exit
endif
nNum := nNum + 1
enddo
// In Vouch you must return at the begining of loop to terminate, exit
clause is not
// supported.
lMore := .t.
do while lMore
if nNum > 313
lMore := .f.
endif
nNum := nNum + 1
enddo
Operator Usage
// nNum++ is correct in Clipper/xBase++, but in Vouch this
notation is valid
nNum := nNum + 1
Code Blocks
Code blocks are supported. But there is a limitation, that is,
only one code block per line of program.
eval( {|| zVrb := zVrb + 1 } ) .and. eval( { || z2nd
:= xSomething } ) // Wrong
if eval( {|| zVrb := zVrb + 1 } ) > 3000 .and. zPkz <
4000 // Right
do something
endif
And do not expect much speed, it is not a
compiled and linked code.
The program is compiled on the fly and is heavily dependant on
macro compilation and string parsing, so can not execute as fast as
compiled code executes. But for all practical purposes it is a useful
extension to application programming.