How to use hex values in the basic IDE

@TDS_Scott
Hi Scott,

I’ll look into this question and get back to you once shortly.

Deryck

Hi Scott,

I don’t think there is an option for entering values into the IDE. Even examples in the user guide create a hex string by converting a decimal to strings hex:
A$= HEX$(1234)
I% = DEC(A$)
rem Now, I% = 1234

The best option i could find would be to convert a string to hex. This would allow you to enter the mask in as hex as needed.
x% = dec (“ff”)
print x%

Best regards,
Deryck

Hi Scott,

I got this function example from our application engineer. it takes in 4 integers and pulls out each character and creates 1 string name_text@ .

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

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