| Original Message |
Solitaire (Login Solitaire1) S Posted Jun 7, 2012 6:49 PM
DIM stx AS STRING, num AS DOUBLE
CLS
INPUT "Enter a hex value: ", stx$
num = VAL("&H" + stx)
PRINT num
For example, entering AB34 will return -21758 instead of 43828.
How can the code be changed to display the correct answer? |
|
|