This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / The Mathematica Book / Mathematica Reference Guide / Listing of C Functions in the MathLink Library /


FilledSmallSquare int MLGetByteString(MLINK link, unsigned char **s, long *n, long spec) gets a string of characters from the MathLink connection specified by link, storing the codes for the characters in s and the number of characters in n. The code spec is used for any character whose Mathematica character code is larger than 255.

FilledSmallSquare MLGetByteString() allocates memory for the array of character codes. You must call MLDisownByteString() to disown this memory.

FilledSmallSquare MLGetByteString() is convenient in situations where no special characters occur.

FilledSmallSquare The character codes used by MLGetByteString() are exactly the ones returned by ToCharacterCode in Mathematica.

FilledSmallSquare The array of character codes in MLGetByteString() is not terminated by a null character.

FilledSmallSquare Characters such as newlines are specified by their raw character codes, not by ASCII forms such as \n.

FilledSmallSquare See Section 2.13.5.

FilledSmallSquare See also: MLGetString, MLGetUnicodeString.