' {$STAMP BS2} ' {$PBASIC 2.5} ' 2008 mlab.uiah.fi/paja ' Understanding type of numbers. ' - Number can STORE 16bits of information. ' - BS cannot have any floating point. e.g. 1.03 can't exist in the BS code. wTest VAR WORD wTest = 123 DEBUG CLS 'clear the debug window. PAUSE 1000 'waiting for 1000ms = 1 second. DEBUG " 100 = BIN: ", BIN 100, CR 'BIN(Binary) DEBUG " 100 = HEX: ", HEX 100, CR 'HEX(hexadecimal) DEBUG " 100 = DEC: ", DEC 100, CR 'DEC(decimal) DEBUG "-100 = DEC: ", DEC -100, CR '65536 - 100 DEBUG "-100 = SDEC: ", SDEC -100, CR, CR 'SDEC(signed decimal) DEBUG "ASCII 100 = ", 100, CR, CR 'if you don't assign value type, 'BS2 give as ASCII code DEBUG ? wTest, CR ' = DEBUG "wTest = ", wTest, CR