Serial_AsciiValueToText |
Converts (one or more) numbers to their equivalent ASCII characters.
Syntax
Serial_AsciiValueToText ( switches ; ASCIIvalues { ; separator } )
Parameters
switches | these alter the behaviour of the function |
ASCIIvalues | one 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_Mac | use 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 16 to FileMaker Pro 2023
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.
Used in example file
ASCIIToText.fmp12
Related function
Serial_TextToAsciiValue |
Related topics
Troi Serial Plug-in online help (overview)