Serial_AsciiValueToText (function reference)

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

Serial_AsciiValueToText

Converts (one or more) numbers to their equivalent ASCII characters.

SyntaxFunction badge

Serial_AsciiValueToText ( switches ; ASCIIvalues { ; separator } )

Parameters

switchesthese alter the behaviour of the function
ASCIIvaluesone or more numbers in the range from 0-255, separated by a separator
separator(optional) the separator between the values. If you omit this parameter " " and | 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_Macuse Mac ASCII for the higher ASCII’s 128-255 (as used in fmp 6)

Returned Result

Data type returned

Text

Result

The converted ASCII text

Originated in

Troi Serial Plug-in 3.0

Compatibility

FileMaker Pro 14 to 18

Considerations

You can also use hexadecimal notation for the numbers. Use 0x00…0xFF to indicate hexadecimal notation.
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.
Values higher than 255 are ignored.

Example

Set Field [ text ; Serial_AsciiValueToText ( "-Unused" ; "65 65 80 13" ) ]

or

Set Field [ text ; Serial_AsciiValueToText ( "-Unused" ; "65|65|80|13" ) ]

This will both result in the text “AAP<CR>” where <CR> is a Carriage Return character

Example 2

Set Field [ text ; Serial_AsciiValueToText ( "-Encoding=ASCII_Mac" ; 
			"0x31-0x32-0x33-0x0D-0x0A" ; "-" ) ]

This will result in the text “123<CR><LF>” where <CR> is a Carriage Return character and <LF> is a Line Feed character.

Related functionFunction badge

Serial_TextToAsciiValue

Related topics

Troi Serial Plug-in online help (overview)


Online Help Page for Troi Serial Plug-in for 14 to 18 –> Serial_AsciiValueToText (serip4812) 2019-0904 11:27:24