The output of the keypad application is of a string data type, whether you are entering characters or numbers.
To convert these strings to a Integer or Double data type a script routine calling the function StringToInt or StringToDouble is used. To convert the number back to a string simply use equivalence in the form MyString = MyDouble or MyInt and Angel Script will perform the data type conversion.
In some applications the ASCII equivalent value of the characters in the string may be needed. This is implemented in a script using the ASCnumber = MyString[index] function to get the ASCII value of each character one at a time using the indexing operation. To convert a ASC number back to a string the indexing function is used again in the form MyString = ASCnumber.
All of the example scripts are located in the ~Demo folder.
This example was created in 2.9.23044 for a PV780 Touch, the touch screen is needed to operate the keypad.
Example: Keypad String Conversions
Please sign in to leave a comment.