Gettextlength; Hex - Omron CX-Supervisor Reference Manual

Script language reference
Hide thumbs Also See for CX-Supervisor:
Table of Contents

Advertisement

Text Commands
Note:

6-12-5 GetTextLength

6-12-6 Hex

The formatting characters are standard 'C' formatting characters (as used by
the C-language sprintf function). Some commonly used types are:
%ld. Insert integer value;
%f. Insert decimal value. Prefix with decimal point and number to control
position (for instance '%.2f' for 2 decimal places);
%s. Insert string;
%IX. Insert hexadecimal value (upper case HEX characters, for instance
'FFFF');
%lx. Insert hexadecimal value (lower case HEX characters, for instance
'ffff');
%c. Insert character (can be used to convert value to character, for
instance to insert control character).
With the text left aligned, and with a width field (for instance '%-6ld' to insert a
value left aligned with a field 6 characters wide).
References
More complex expressions (for instance controlling justification, decimal
places, number base, etc.) are also possible.
reference book for full details of the format used by the 'sprintf' function.
Syntax
value = GetTextLength (textpoint)
Remarks
Argument
Type
textpoint
text
point
returnpoint
Integer /
real
Typical Example
textpoint = "Hello World"
count = GetTextLength (textpoint)
The number of characters in 'textpoint' is counted and the point 'count' is set to
the value 11.
Syntax
result = Hex (value)
Remarks
Argument
Type
Value
Result
Typical Example
HStr = Hex (44)
In this example, 'Hstr' contains '2C'.
SECTION 6 Functions and Methods
Refer to any C language
Description
This is the point which has its text length
counted.
This is the point that holds the return value.
Description
Number to be converted to a Hex number.
String containing Hex representation of value.
89

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 3.1

Table of Contents