X (String function): Difference between revisions
Jump to navigation
Jump to search
m (moved Intrinsic X Function to X (String function): rename) |
mNo edit summary |
||
Line 29: | Line 29: | ||
===See also=== | ===See also=== | ||
[[List of Intrinsic String Methods]] | [[List of Intrinsic String Methods]] | ||
[[Category:Intrinsic Methods]] | |||
[[Category:Intrinsic String Methods]] |
Revision as of 22:34, 27 August 2010
This intrinsic function returns the unencoded value of a hex-encoded string. It is a compile-time-only equivalent of the HexToString method. Since in use the method acts like a hex constant, it is also documented with the Constant methods.
The X function treats each input character as an input hex digit.
The X method is available as of Sirius Mods version 7.3.
X syntax
%out = string:X
Syntax Terms
- %out
- A string variable to receive the unencoded value of the method object string.
- string
- A hex-encoded string value.
Usage Notes
- As in all Janus SOAP system methods with string outputs, the %out string variable provides longstring behavior. This adds 28 bytes of VTBL usage to every X constant, however.
- Although its utility is dubious, the following is valid and sets %x to 'X'01:
%x = 'f0f1':x:x
- The X function requires a method object string with an even number of bytes.
Example
The following statement would display '1234':
printText {'f1f2f3f4':x}