14.03.2014 Views

Download Jmp User Guide

Download Jmp User Guide

Download Jmp User Guide

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 C Formula Functions Reference 463<br />

Character Functions<br />

The Item function returns a missing value because it treats the comma and blank separately and finds<br />

nothing between them. The Word function treats the comma and blank as a single delimiter and finds<br />

Veronica as the second word.<br />

If you do not specify a delimiter, white space (blank space) is used as the delimiter. If you define the<br />

delimiter as an empty string, each character is treated as a separate item.<br />

Char to Hex, Hex, Hex to Char, Hex to Number<br />

Converts between Hex and other formats.<br />

Hex returns the hex representation of its argument. If the argument is character (in quotes), then the<br />

result is a character string twice as long containing the hexadecimal codes for the character values. For<br />

example, Hex("A") returns the string 41.<br />

If the argument is numeric and “integer” is specified, the Hex function returns an 8-hex-character<br />

representation of the integer returned. For example, Hex(12, “integer”) returns the string 0000000C<br />

(Macintosh) or 0C000000 (Windows and Linux).<br />

Hex to Char converts hexadecimals to characters. The resulting character string might not be valid<br />

display characters. All the characters must be in pairs, in the ranges 0-9,A-Z, and a-z. Blanks and<br />

commas are allowed and skipped.<br />

Char to Hex converts characters to hexadecimals.<br />

Hex to Number converts hexadecimals to numbers.<br />

For details, see “Internal functions (calculator functions)” in the “Syntax Reference” chapter of the JMP<br />

Scripting <strong>Guide</strong>.<br />

Repeat<br />

Creates a string that is the first argument repeated the number of times specified by the second<br />

argument. The first argument can be either a character literal, a character variable, or a character<br />

expression. For example, Repeat(“Katie”, 3) creates KatieKatieKatie.<br />

A third argument applies when Repeat is used in a JSL script to repeat a matrix. When the first<br />

argument is a matrix, the second argument is the rowwise repeat and the third argument is the<br />

columnwise repeat.<br />

Insert, Insert Into<br />

Insert inserts a new item into the list or expression at the given position. If position is not given, it is<br />

inserted at the end.<br />

Insert Into is the same as insert, but it inserts in place.<br />

C Formula Functions Reference<br />

Remove, Remove From<br />

Remove the character(s) at the indicated position. If n is omitted, the item at position is deleted. If<br />

position and n are omitted, the item at the end is removed. There are three possible arguments: the<br />

string, followed by the position, followed by the number of characters to be removed.<br />

Remove From returns items removed in place. The function returns the removed item(s), but you<br />

don’t have to assign them to anything. The first argument is a variable name, followed by the position,<br />

followed by the number of characters to be removed.

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

Saved successfully!

Ooh no, something went wrong!