ASCII
Yields the ASCII code for characters in strings.

Arguments | |||
---|---|---|---|
IN | IN | STRING | Any non-empty string |
Pos | Pos | DINT | Position of the selected character in set [1.. len] (len is the length of the IN string) |
ASCII | Code | DINT | Code of the selected character (in set [0 .. 255]) yields 0 is Pos is out of the string |
Example
(* FBD Program using "ASCII" Function *)

(* ST Equivalence: *)
FirstChr := ASCII (message, 1); (* FirstChr is the ASCII code of the first character of the string *)
Provide Feedback