Converts a number to a monetary format.
Syntax
$money(number)
Parameters
number | a number, or an expression that evaluates to a number |
Return Value
Number, with two decimal places.
Comments
Use $money to convert a number into a monetary number (i.e., with two decimal places). Number is rounded if necessary.
Example
$money(101.325+48.674)
Evaluates to 150.00.
See Also
$round
$tonumber
About Functional Expressions
Decimals and Rounding
Decimals in Functional Expressions
Number Literals
Performs a Boolean NOT of a logic expression.
Syntax
NOT expression
Parameters
expression | A logic expression using conditional and Boolean operators. If the expression is complex, it must be enclosed in parentheses. |
Return Value
Logical.
Comments
If expression is logically true, the entire expression, including the NOT, is logically false.
If expression is logically false, the entire expression, including the NOT, is logically true.
Example
not Population > 250000
See Also
Boolean Expressions
Conditional Expressions
The name of the text editor software for editing programs.
Syntax
$editor
Return Value
A character string. Can be reset by an application program.
Description
The name of a text editor.
Each time you start a new application session, $Editor is set, by default, to the name of an editor commonly used on the current operating system, or to the value of the editor in the registry. The variable is often reset by the application program to the name of the preferred text editing package.
Since Zim-X 9.50, the default editor is set to “IDE”.
The name should include the full disk path, if necessary. The special file path indicator characters can be used.
The value of this variable is used by the EDIT command.
Example
let $editor = "c:dosedit.com"
See Also
EDIT
Enables or suppresses the display of all system messages.
Syntax
SET MESSAGES ON|OFF
Comments
The MESSAGES option is set ON by default.
When MESSAGES is ON, all system messages (errors, warnings, information) are displayed. Setting MESSAGES to OFF suppresses the display of all messages.
The display of specific message types may be turned on or off using the SET ERRORS, SET INFORMATION, and SET WARNINGS commands.
The SET MESSAGES command has no effect on the logging of messages in the “error trace” file. Message logging is governed by the configuration option error trace.
Example
set messages on
set warnings off
The preceding commands set error and information messages on, but warnings off.
See Also
SET ERRORS
Used with the LIKE operator to construct patterns for matching.
Comments
Used with the LIKE operator in logic expressions, the _ wildcard matches any single character when the pattern on the right is compared to expression.
Example
"_ob%"
Matches any character string whose second and third letters are ob, followed by zero or more characters (i.e., “Robert”, “Bob”, “Cobbler”, etc.).
compute Employees where LastName like "_a%n"
Processes all records whose LastName values are three characters or more, the second character being an a and the last character being an n.
Grade like "100\%"
Shows the per cent sign being used literally in a string. (The first backslash “escapes” the second backslash, which, in turn, “escapes” the per cent sign, turning it into a literal character.)
find Parts where PartDesc like "%\\%"
Finds PARTS whose part description contains a backslash.
FirstName like $concat("S_e%p",SuffixVariable)
Assuming that SuffixVariable is “%”, then the above expression is logically true if FirstName matches the pattern “S_e%p%”.
Enables or suppresses the display of error messages.
Syntax
SET ERRORS ON|OFF
Comments
The ERRORS option is set ON by default.
When ERRORS is ON, error messages are displayed. Setting ERRORS to OFF suppresses the display of such messages. Error messages are of the form:
*** Error*** . . .
or:
***Zim System Error*** . . .
All types of messages can be simultaneously turned on or off with a SET MESSAGES command.
SET ERRORS has no effect on the logging of messages in the “error trace” file as this logging is always on and cannot be disabled.
Example
set messages on
set errors off
The preceding commands set warning and information messages on, but error messages off.
See Also
SET INFORMATION
SET WARNINGS
Extracts “ticks” information from a standard time value.
Syntax
$ticks(time)
Parameters
time | an 8-digit number, or an expression that evaluates to an 8-digit number, expressing valid time in the form HHMMSSTT |
Return Value
Number.
Comments
The system variable $Time is often used for time.
With operating systems whose clocks do not support hundredths of a second, $ticks($Time) evaluates to 0, because the last two digits of $Time are always zeros.
Example
$ticks($Time)
Evaluates to 99 when $Time has the value 23595999.
See Also
$hours
$minutes
$seconds
Uncompiles an application program.
Syntax
UNCOMPILE progdocname
Parameters
progdocname | The name of the application document containing the program to be “uncompiled”. |
Comments
The UNCOMPILE command marks the specified application program as “not compiled”. If progdocname had not been compiled (using the COMPILE command) when the UNCOMPILE was issued, the software raises a warning.
The UNCOMPILE command has no effect on the disk file that contains the compiled version of the program, but prevents the file from ever being used.
See Also
$compilestatus
COMPILE
SET RUNTIME
SET SQLCOMPILE
Creates the named ActiveX object.
Syntax
$ObjCreate (ProgId)
Parameters
ProgId | a string or an expression that evaluates to a string |
Return Value
Returns an object that can be assigned to a variable of type object.
Comments
An ActiveX or COM object is identified by a GUID (a globally unique number). A ProgId identifies a COM object with a meaningful name. It looks like vendor.component.version or vendor.component.
When you assign to an Object variable using $ObjCreate, the existing COM object referenced by the Object variable (if any) is released.
Before your program terminates, it’s a good idea to set any Object variables to $Null, so that the objects your program used can be released. Otherwise, even after your program terminates, because the Zim variables still exist and still reference the COM objects you used, the objects will still be active and consuming memory and resources.
This does not apply to the OLE control form variable, since when the form is closed the OLE control is automatically released, but it does apply to any objects returned from an OLE control via $ ObjRunMethod or $ ObjGetProperty.
Warning
COM objects are being discontinued by Microsoft and may not be available in future releases of Zim-X.
Enables or suppresses the display of warning messages.
Syntax
SET WARNINGS ON|OFF
Comments
The WARNINGS option is set ON by default.
When WARNINGS is ON, warning messages are displayed. Setting WARNINGS to OFF suppresses the display of warning messages. Warning messages are of the form
***Warning*** …
All types of messages can be simultaneously turned on or off with a SET MESSAGES command.
The SET WARNINGS command has no effect on the logging of messages in the “error trace” file. Message logging is governed by the configuration option error trace.
Example
set messages on
set warnings off
The preceding commands set error and information messages on, but warnings off.
See Also
SET ERRORS
SET INFORMATION