Talk:Saving data in many formats/@comment-66.67.113.134-20150925172613

This is a really great tutorial so far. You should add the ASC and CHR$ commands to the grp tutorial for converting strings to and from graphical data. also to convert a hexadecimal string to a integer you can use the following code. I am pretty sure this will work.

A$=HEX$(2045)`7FD

HEXVAL=0

FOR I=LEN(A$)-1 TO 0 STEP -1

B=ASC(MID$(A$,I,1))

C=0

IF B>47 OR B<58 THEN HEXVAL=HEXVAL+(B-48)*POW(16,LEN(A$)-1-I):C=1

IF B>64 OR B<71 THEN HEXVAL=HEXVAL+(B-55)*POW(16,LEN(A$)-1-I):C=1 ELSE C=0

IF !C THEN @FAIL

NEXT

PRINT HEXVAL

END

@FAIL

PRINT "INVALID HEXCODE"

END