Marks the start of a comment in an application program.
Syntax
[ZIMcommand] % comment
Parameters
ZIMcommand | Any portion of a command that appears on one line in an application program. |
comment | Any string of characters, normally a few words explaining either ZIMcommand or an entire section of the program. The command parser ignores comment. |
Comments
The percent sign marks the start of a comment in an application program.
Example
% Process accelerators
form set (not scroll) fPlayers % switch off scrolling
case
when Event.EventName = "F3" % "Exit" accelerator
return % terminate main procedure
when Event.EventName = "F4" % "Update" accelerator
UpdatePlayers ()
when Event.EventName = "F5" % "Add" accelerator
AddPlayers (PlayersAdded)
when Event.EventName = "F6" % "Delete" accelerator
DeletePlayers (PlayersDeleted)
when Event.EventName = "F7" % "Report" accelerator
ReportPlayers ()
endcase
Matches all subsequent characters in a value.
Syntax
expression1 = expression2 ?
Parameters
expression1 | A character string, or a variable or form field that evaluates to a character string. |
expression2 | A character string, or a variable or form field that evaluates to a character string. |
Comments
Used with the equals sign in logic expressions, the ? wildcard matches any number of subsequent characters when expression2 is compared to expression1. The question mark must appear outside of the pattern string.
Example
DeptNum = "D56"?
Logically true if the department number begins with the string “D56”. Notice that the question mark must appear outside the string.
RemarkField = "Smith?"
Shows the question mark being used literally in a string. (The characters appear inside the quotation marks.) The expression is logically true only if Remarkfield contains the exact characters Smith?.
Surname = fCustomer.LastName?
Shows how the wildcard can be attached directly to an atomic expression employing a variable, local variable, form field, or formal parameter, provided the object is of a character data type. (Trailing blanks in the specified object are trimmed for pattern-matching purposes.)
See Also
Conventions
How To Construct Logic Expressions
How To Use Logic Expressions
DDEExecute
Send commands and macros to the target application.
Syntax
procedure DDEExecute (out tErrCode, inout tServ,
in app_cmd)
Parameters
tErrCode | longint, an error code |
tServ | longint, connection handle |
app_cmd | char, command or macro to be executed |
Comments
DDEExecute sends target application specific commands and macros to be executed by the remote application. Consult the documentation of the remote application for information on these commands.
The filename is ddeexec.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, to send the ‘[NEW(1)]” command to EXCEL
DDEExecute(DDE_Err, hServ, ‘[NEW(1)]’)
instructs EXCEL to open a new spreadsheet.
DDEPoke
Assigns a value to a specific item in a remote application.
Syntax
procedure DDEPoke (out tErrCode, inout tServ,
in dde_item, in dde_val)
Parameters
tErrCode | longint, an error code |
tServ | longint, connection handle |
dde_item | char, item name |
dde_val | char, value of the item |
Comments
DDEPoke assigns a value to a specific item in a remote application. Consult the documentation of the remote application for information on what constitutes an item. The value of an item is always given as char.
The filename is ddepoke.pgm.
Example
For example, given that DDE_Err and hServ are of type longint, to set the value of row 1, column 1 in the current spreadsheet, enter the following:
DDEPoke (DDE_Err, hServ, ‘R1C1′, ’25’)
This example “pokes” the value ’25’ into row 1, column 1.
DDEPeek
Syntax
procedure DDEPeek (out tErrCode, inout tServ, in dde_item, out dde_val)
Parameters
tErrCode | longint, an error code |
tServ | longint, connection handle |
dde_item | char, item name |
dde_val | char, value of the returned item. Must be a string at least five characters in length |
Comments
DDEPeek retrieves the value of a specific item from a remote application. Consult the documentation of the remote application for information on what constitutes an item. The value of an item is always returned as char.
The filename is ddepeek.pgm.
Example
For example, given that DDE_Err and hServ are of type longint, that DDE_OutValue is of type alpha and is 10 characters long, and that hServ has been set in a previous call to DDEConnect, to retrieve the value of row 1, column 1 in the current spreadsheet, enter the following:
DDEPeek(DDE_Err, hServ, ‘R1C1’, DDE_OutValue)
This example “peeks” at the value of the cell at row 1, column 1 and places the retrieved value in DDE_OutValue.
Extracts the year number associated with a specified date value.
Syntax
$year(date)
Parameters
date | a data, or an expression that evaluates to a date, in the form YYYYMMDD |
Return Value
Character string.
Comments
This function extracts day information from standard date values. Date is often the system variable $Date.
Example
$year(19981225)
Evaluates to “1998”.
$year($date + 7)
Evaluates to “1999” when $Date is 19991225.
See Also
$addyears
$Date
$day
$dayname
$month
$monthname
$weekday
About Data Types
About Functional Expressions
Tests if a character string is a valid object name.
Syntax
$iszimname(string)
Parameters
string | a character string or an expression that evaluates to a character string |
Return Value
1-character binary string. Evaluates to 1 ($True) if string meets the validation test; otherwise, evaluates to 0 ($False).
Comments
This function tests if a particular character string is valid zim object name.
Example
$iszimname(189)
Evaluates to $False.
$iszimname("Fields")
Evaluates to $True.
See Also
$isalphabetic
$isalphanumeric
$isdate
$isdigit
$islower
$isnumber
$isupper
About Character Literals
About Functional Expressions
Determines the day-of-the-week number associated with a specified date value.
Syntax
$weekday(date)
Parameters
date | a date, or an expression that evaluates to a date, in the form YYYYMMDD |
Return Value
Character string.
Comments
This function extracts day information from standard date values. Date is often the system variable $Date.
Example
$weekday(19981225)
Evaluates to “7”.
$weekday($date+7)
Evaluates to “7” when $Date is 19981225.
See Also
$addmonths
$Date
$day
$dayname
$month
$monthname
$year
About Data Types
About Functional Expressions
Tests if an expression produces a valid number after its evaluation.
Syntax
$isnumber(expression)
Parameters
string | a character string or an expression that evaluates to a character string |
Return Value
1-character binary string. Evaluates to 1 ($True) if string meets the validation test; otherwise, evaluates to 0 ($False).
Comments
This function tests if a particular character string is a valid number.
Example
$isnumber(2+3)
Evaluates to $True.
$isnumber($trim(LastName))
Evaluates to $False.
See Also
$isalphabetic
$isalphanumeric
$isdate
$isdigit
$islower
$isupper
$iszimname
About Character Literals
About Functional Expressions
Converts a character into its ordinal number value.
Syntax
$toord(char)
Parameters
char | a character string, or any expression that evaluates to a character string |
Return Value
Number.
Comments
Each of the decimal numbers from 0 to 255 represents a character output by your workstation. $Toord converts the given character to the corresponding decimal number.
If char contains more than one character, only the first character is converted.
The number produced by the $toord function can be converted back to a character by the $tochr function.
Example
$toord(" ")
Evaluates to 32 (on ASCII machines).
$toord(tochr(anynumber ))
Evaluates to any number.
See Also
$toalpha
$tocharacter
$tochr
$todate
About Functional Expressions
Number Literals