Skip to main content

Serial_TextToAsciiValue (function reference)

By July 1, 2023July 17th, 2023Online 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 16 to FileMaker Pro 2023

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”.

Used in example file

ASCIIToText.fmp12

Related functionFunction badge

Serial_AsciiValueToText

Related topics

Troi Serial Plug-in online help (overview)


Online Help Page for Troi Serial Plug-in for 16 to 2023 –> Serial_TextToAsciiValue (serip4813) 2023-0717 13:08:05