The error severity level generated by the last command executed.
Syntax
$errlevel
Value
A number (0 to 4.) Can be reset by an application program.
Description
The error severity level of the most recently executed command.
| Value | Meaning |
| 0 | No error. |
| 1 | Information message. |
| 2 | Warning. |
| 3 | User error. |
| 4 | System error. |
See Also
$ErrCode
$LastErrLevel
$MaxErrLevel
System Variables
INTERSECT
Isolates the common members of two or more result sets.
Syntax
set1 INTERSECT set2
Parameters
| set1 | A result set produced from the execution of a set-producing command. All sets in the command must have the same component structure. |
| set2 | A result set produced from the execution of a set-producing command. All sets in the command must have the same component structure. |
Comments
When used within a FIND command, the result set contains the members that are common to each of the specified result sets, with duplicates eliminated.
See Also
FIND
MINUS
UNION
Controls command tracing.
Syntax
SET [LOCAL] TRACE ON|OFF
Parameters
| LOCAL | Indicates that command tracing is to be switched ON or OFF at the “local” level only. |
Comments
The SET TRACE command controls command tracing. When TRACE is switched ON, each line of a procedure is displayed as it is executed. Each line is preceded by the procedure name and document line number as shown in the following example:
pCustReport[19] report from Customers
SET TRACE has no effect on compiled application programs.
SET TRACE is not affected by the SET RESET and SET RESTORE commands.
Example
To display the instructions in the procedure MyProg as they are executed, use
set trace on
MyProg
See Also
SET COMMANDTIMING
SET LEXTRACE
SET TRACEOUTPUT
DDEDisconnect
Terminate access to the remote application.
Syntax
procedure DDEDisconnect (out tErrCode, inout tServ)
Parameters
| tErrCode | longint, an error code |
| tServ | longint, connection handle |
Comments
DDEDisconnect terminates the access to the remote application.
The filename is ddedisc.pgm.
Example
For example, given that DDE_Err and hServ are of type longint and that hServ has been set by a previous call to DDEConnect, enter the following to terminate a DDE conversation:
DDEDisconnect (DDE_Err, hServ)
This example ends a conversation previously established using the CONNECT service.
$filepath
Returns the path of the disk file associated with a specified object.
Syntax
$filepath(objname)
Parameters
| objname | The name of an EntitySet, relationship, application directory, or application document. |
Return Value
The $filepath function returns a character string containing the path to the disk file that contains the specified object. AREAS.ZIM or DIRS.ZIM entries that apply to the file are expanded, as are the special path indicator characters. The value of $filepath is dynamically set, unless the program is compiled. Once a program is compiled, this value cannot be changed.
See Also
$ClipPath
$DBPath
$filenum
$ImagePath
$WorkPath
$ZimPath
Steps through a procedure one command at a time, halting after each command.
Syntax
SET SINGLESTEP ON|OFF
Comments
When SINGLESTEP is switched ON, execution is halted (by the HALT utility) after each command executed. To resume execution after the HALT, press Enter at the HALT prompt (>>).
Compiled application programs are not affected by SET SINGLESTEP.
The SET SINGLESTEP command is not affected by the SET RESET and SET RESTORE commands.
Example
To switch to singlestep, use
> set trace on
> set singlestep on
Now, if you execute an application program, it looks like this:
> DoCusts (“edit”)
procedure DoCusts (in ExMode)
>>output $setcount
35
>>(carriage return)
let dp = $true
>>.
.
.
See Also
SET STOP ERRORS
Truncates a decimal number, making it an integer.
Syntax
$truncate(number)
Parameters
| number | a number, or an expression that evaluates to a number |
Return Value
Number, with no decimal places.
Example
$truncate(2.49)
Evaluates to 2.
$truncate(2.99)
Evaluates to 2.
int1 - $truncate(int1/int2) * int2
Performs int1 modulo int2. Can also be expressed as $modulus(int1,int2).
See Also
$modulus
$round
$tonumber
Trims trailing blanks from a character string.
Syntax
$ttrim(string)
Parameters
| string | a character string, or any expression that evaluates to a character string |
Return Value
Character string.
Comments
Use $ttrim to remove trailing spaces from a character string.
For output purposes, the implicit length of the result returned by $ttrim is the same as the length of string.
Example
$ttrim (LastName)
Evaluates to “Smith” if LastName is stored as “Smith “.
detail line $concat($ttrim(LastName),", ",FirstName)
Displays a last name first in a report.
See Also
$ltrim
Indicates a positive value (unary +) or adds two values.
Syntax
[expression1]+expression2
The plus sign (+) adds the expression on the right to the expression on the left.
Parameters
| expression1 | a number or expression that evaluates to a number |
| expression2 | a number or expression that evaluates to a number |
Comments
Arithmetic operators indicate the sign of a number or perform arithmetic operations (addition, subtraction, multiplication, division, exponentiation).
See Also
About Arithmetic Expressions
Rules of Precedence for Arithmetic Operators
Converts alphabetic characters to upper case.
Syntax
$toupper(source)
Parameters
| source | any value, or an expression that yields any value |
Return Value
Character string, in which all letters are uppercase.
Comments
$toupper returns a character string in which all letters are upper case. If source is not of a character data type, it is converted to a character data type before the function is applied.
Example
$toupper("the QUICK BROWN fox is 30 years oLD")Evaluates to “THE QUICK BROWN FOX IS 30 YEARS OLD”.
See Also
$tolower