Serial_TextToAsciiValue (function reference)

By September 1, 2019September 4th, 2019Online Help, Troi Serial Plug-in
Troi Serial Plug-in > Functions reference > Serial_TextToAsciiValue
Troi Serial Plug-in for FileMaker Pro

Serial_TextToAsciiValue

Converts text to one or more ASCII values.

SyntaxFunction badge

Serial_TextToAsciiValue ( switches ; text { ; separator } )

Parameters

switches these alter the behaviour of the function
text the text to convert
separator (optional) the separator between the values, if you omit this parameter " " is used

Switches

Switches can be empty or one of this:

-Encoding=Native (default) use Unicode encoding for the higher ASCII’s 128-255
-Encoding=ASCII_DOS use OEM DOS ASCII for the higher ASCII’s 128-255
-Encoding=ASCII_Windows use Ansi Windows ASCII for the higher ASCII’s 128-255
-Encoding=ASCII_Mac use Mac ASCII for the higher ASCII’s 128-255 (as used in fmp 6)

Returned Result

Data type returned

Text

Result

one or more ASCIIvalues (in the range from 0-255) separated by spaces
If a character is out of range, a ? (question mark) is returned on the place of the character

Originated in

Troi Serial Plug-in 3.0

Compatibility

FileMaker Pro 14 to 18

Considerations

The graphic rendition of characters greater than 127 is undefined in the American Standard Code for Information Interchange (ASCII Standard) and varies from font to font and from computer to computer and may look different when printed.

Example

Say you have a text “AAP<CR>”, where <CR> is a Carriage Return character. Then call the function like this:

Serial_TextToAsciiValue ( "-unused" ; "AAP<CR>" )

This will result in “65 65 80 13”

Example 2

Set Field [ text ; Serial_TextToAsciiValue ( "-unused" ; "AAP<CR>";  "," ) ]

where <CR> is a Carriage Return character. This will result in “65,65,80,13”.

Related functionFunction badge

Serial_AsciiValueToText

Related topics

Troi Serial Plug-in online help (overview)


Online Help Page for Troi Serial Plug-in for 14 to 18 –> Serial_TextToAsciiValue (serip4813) 2019-0904 11:56:58