14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix A JSL Syntax Reference 567<br />

Character Functions<br />

Hex To Number(string)<br />

Description<br />

Converts the quoted hexadecimal string to its character equivalent, using the specified encoding, if<br />

provided. The default value for encoding is "utf-8".<br />

Example<br />

Hex To Number("80");<br />

128<br />

Note<br />

16-digit hexadecimal numbers are converted as IEEE 754 64-bit floating point numbers.<br />

Insert(source, item, )<br />

Insert(source, key, value)<br />

Description<br />

Inserts a new item into the source at the given position. If position is not given, item is added<br />

to the end.<br />

For an associative array: Adds the key into the source associative array and assigns value to it. If the<br />

key exists in source already, its value is overwritten with the new value.<br />

Arguments<br />

source A string, list, expression, or associative array.<br />

item or key Any value to be placed within source. For an associative array, key might or might<br />

not be present in source.<br />

position Optional numeric value that specifies the position in source to place the item into.<br />

value A value to assign to the key.<br />

Insert Into(source, item, )<br />

Insert Into(source, key, value)<br />

Description<br />

Inserts a new item into the source at the given position in place. The source must be an L-value.<br />

Arguments<br />

source A variable that contains a string, list, expression, or associative array.<br />

item or key Any value to be placed within source. For an associative array, key might or might not<br />

be present in source.<br />

position Optional numeric value that specifies the position in source to place the item into.<br />

value A value to assign to the key.<br />

Item(n, string, )<br />

Description<br />

Extracts the nth word from a quoted string according to the quoted string delimiters given. The<br />

default delimiter is space. If you include a third argument, any and all characters in that argument are<br />

taken to be delimiters.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!