Serial_TextToAsciiValue |
Converts text to one or more ASCII values.
Syntax
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 function
Serial_AsciiValueToText |
Related topics
Troi Serial Plug-in online help (overview)