Character Data Conversion

Version 5

ATEasy allows character data conversion through assignment; namely, a byte or char array can assign to String or vise versa.

For example, if aByteArray is an array of bytes of size 10, aCharArray is an array of characters of size 10, and sString is of type String, the following assignments are allowed:

 

sString="abc"

sByteArray=sString    ! now aByteArray contains "abc"
 

sString="test string"

aCharArray=sString    ! now aCharArray contains "test strin" - only 10 characters copied

If the size of array is shorter than the string length, the string will be truncated. Notice only 10 characters are copied in the second example above.