How to convert integer variable or tags to string


#1

With the following script you can convert 4 integers to a single 8 character string.

Function call example:

Name_Text@ = @ConvertToString$ (D10000@, D10001@, D10002@, D10003@)

Function:

FUNCTION ConvertToString$ ($Chars01%, $Chars23%, $Chars45%, $Chars67%)
Char0$ = CHR$(INT($Chars01%/255))
Char1$ = CHR$($Chars01%)
Char2$ = CHR$(INT($Chars23%/255))
Char3$ = CHR$($Chars23%)
Char4$ = CHR$(INT($Chars45%/255))
Char5$ = CHR$($Chars45%)
Char6$ = CHR$(INT($Chars67%/255))
Char7$ = CHR$($Chars67%)
$ConvertToString$ = Char0$ + Char1$ + Char2$ + Char3$ + Char4$ + Char5$ + Char6$ + Char7$
ENDFN

How to use hex values in the basic IDE