|
By patvdv at 26 Feb 2008 - 21:56
|
|
NULL characters in strings
Technically, a string is an array of characters. The internal representation of a string has a NULL character [] at the end. The NULL character represents the character with the value zero.
Null characters can occur within strings after use of the following functions:
|
|
|
|
By patvdv at 26 Feb 2008 - 21:56
|
External variables
An external variable is declared outside the function blocks. You can use them in all functions that occur after the variable declaration, and also in other programs (for example, forms, reports, and runtime expressions). It is possible to declare external variables within a function block but this is not recommended.
If a local variable has the same name as an external variable, the local variable is used within the function. The external variable is not affected.
|
|
|
|
By patvdv at 26 Feb 2008 - 21:56
|
|
Numeric constants
The Baan 3GL programming language supports long and floating point constants. Both types can be preceded by a '+' or a '-' sign.
Long constants
A long constant consists of the digits 0-9 only. For example:
|
|
|
|
By patvdv at 26 Feb 2008 - 21:56
|
Fixed and based variables
Fixed variables
A string variable can be declared as fixed so that its current length always equals the maximum length. For example:
STRING name(10) FIXED
name = "andrew" | the string is always filled up with spaces
The keyword FIXED is applicable to one-dimensional strings only. Multi-dimensional string arrays are always fixed and do not need to be declared with the keyword FIXED.
|
|
|
|
By patvdv at 26 Feb 2008 - 21:56
|
Object identifications (preprocessor)
The compiler always places a default identification in an object, but you can include you own if you wish. You can use the UNIX command what to write all object lines that begin with '@(#)' on standard output.
The default identification has the following content:
#ident "@(#)<source name>, YY/MM/DD, [HH/MM], From ${logname}"
To set you own identification use the following statement:
|
|
|
|
By patvdv at 26 Feb 2008 - 21:56
|
|
|
|
By patvdv at 26 Feb 2008 - 21:56
|
Glossary
4GL engine
|
|
|
|
By patvdv at 26 Feb 2008 - 21:56
|
|
|
|
|
|
By patvdv at 26 Feb 2008 - 21:56
|
Arithmetic operators
Arithmetic operators perform arithmetic operations on the operands. All arithmetic operators, except string concatenation, must have operands of numerical type. If one of the two operands is a double, the other is also converted to double, and the result is also of double type. For example:
|
|
|