Calculates the hyperbolic sine of a number.
Syntax
$sinh(number)
Parameters
| number | a number, or an expression that evaluates to a number, representing an angle (in radians) |
Return Value
Number, with the same number of decimal places as number.
Comments
This function calculates the hyperbolic sine of a number.
Example
let vAngle = $sinh(3.000)
Evaluates to 10.018.
See Also
$asin
$cosh
$sin
$tanh
Calculates the hyperbolic cosine of a number.
Syntax
$tanh(number)
Parameters
| number | a number, or an expression that evaluates to a number, representing an angle (in radians) |
Return Value
Number, with the same number of decimal places as number.
Comments
This function calculates the hyperbolic tangent of a number.
Example
let vAngle = $tanh(3.000)
Evaluates to 0.995.
See Also
$atan
$cos
$sin
About Functional Expressions
Returns the number of the disk file associated with a specified object.
Syntax
$filenum(objname)
Parameters
| objname | The name of an EntitySet, relationship, application directory, or application document. |
Return Value
For EntitySets, relationships, and application directories, $filenum returns the number associated with the file that contains the specified object.
For application documents, $filenum returns the number associated with the file that contains the application directory in which the application document was created.
See Also
$filepath
Set the properties of an ActiveX object.
Syntax
$ObjSet[Property] (Object, PropertyName, <>)
Parameters
| Object | an object variable or formfield of type OLE |
| PropertyName | a string or an expression that evaluates to a string |
| PropertyValue | one or more strings, expressions or variables |
Return Value
Returns a result of TRUE if successful.
Comments
This syntax can be used to set basic or extended properties of an ActiveX component.
Example
Assume you have a form called treeview with a treeview component on it called tree.
Assume vResult is a variable of type char 1. The syntax to direct the Treeview component to display lines among sibling nodes, parent nodes and the root node is
let vResult = $ObjSetProperty (treeview.tree, 'linestyle', 1)
Warning
COM objects are being discontinued by Microsoft and may not be available in future releases of Zim-X.
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
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
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.
Converts an expression to the date data type.
Syntax
$todate(expression)
Parameters
| expression | Any expression. To be meaningful, it should yield a number that has meaning in the format YYYYMMDD. |
Return Value
Date.
Example
$date - $todate(19980923)
In the preceding arithmetic expression, 19980923 is treated as the date 23 September 1998 instead of the number 19,980,923. Assuming that $Date is 19981023, the expression evaluates to 30.
See Also
$toalpha
$tocharacter
$tonumber
Trims leading blanks from a character string.
Syntax
$ltrim(string)
Parameters
| string | a character string or an expression that evaluates to a character string |
Return Value
Character string.
Comments
Use $ltrim to remove leading spaces from a character string.
For output purposes, the implicit length of the result returned by $ltrim is the same as the length of string.
Example
$ltrim(Salary)
Evaluates to “20000” if Salary is 20,000 (INT data type).
See Also
$trim
$ttrim
Trims leading and trailing blanks from a character string in a field.
Syntax
$trim(string)
Parameters
| string | a character string, or any expression that evaluates to a character string |
Return Value
Character string.
Comments
Use $trim to remove leading and trailing spaces from a character string in a field.
For output purposes, the implicit length of the result returned by $trim is the same as the length of string.
Example
$trim(LastName)
Evaluates to “Smith” if LastName is stored as ” Smith “.
See Also
$ltrim
$ttrim