| System Functions |
|
| Format | DEC(string$[,ERR=stmtref]) Where: |
||
| stmtref | Program line number or statement label to which to transfer control. | ||
| string$ | Character string or variable containing value to be converted to binary. | ||
| Returns | Two's complement binary equivalent of the string. | ||
| Description | The DEC( ) function converts a string to its corresponding binary equivalent. (The value returned is a two's complement binary integer which corresponds to the value of the string.) | ||
| Examples | 0020 LET A$="a"; PRINT DEC(A$), 0030 LET B$=$0040$; PRINT " | ",DEC(B$), 0040 LET C=DEC("A"); PRINT " | ",C, 0050 LET A=DEC($FE$); PRINT " | ",A, 0060 PRINT " | DONE" -:RUN |
||
| 97 | 64 | 65 | -2 | DONE | |||