DEC( ) |
Get Binary of String |
DEC(string$[,ERR=stmtref])
| |
stmtref |
Program line number or statement label to which to transfer control. |
string$ |
Character string or variable containing value to be converted to binary. |
Two's complement binary equivalent of the string.
The DEC( ) function converts a string to its corresponding binary equivalent. (The value returned is a two's complement binary integer that corresponds to the value of the string.)
A$="a";
print dec(A$),
B$=$0040$;
print " | ",dec(B$),
C=dec("A");
print " | ",C,
A=dec($FE$);
print " | ",A,
print " | DONE"
->run
97 | 64 | 65 | -2 | DONE