decimal/octal/hexadecimal in Java
Name:
Anonymous
2009-02-06 6:23
int decVal = 26; // The number 26, in decimal
int octVal = 032; // The number 26, in octal
int hexVal = 0x1a; // The number 26, in hexadecimal
like is there any speed advantage in what you choose?
Name:
Anonymous
2009-02-06 10:00
section_3_1_1 = do
withdraw 25
withdraw 25
Control.Exception.catch (withdraw 60 >>= print) print
withdraw 15
readIORef balance >>= print
newWithdraw' <- newWithdraw
newWithdraw' 25
newWithdraw' 25
Control.Exception.catch (newWithdraw' 60 >>= print) print
newWithdraw' 15 >>= print
b1 <- newIORef 100
let w1 = makeWithdraw b1
b2 <- newIORef 100
let w2 = makeWithdraw b2
w1 50
w2 70
Control.Exception.catch (w2 40 >>= print) print
w1 40
readIORef b1 >>= print
readIORef b2 >>= print
acc <- makeAccount 100
accountWithdraw acc 50
Control.Exception.catch (accountWithdraw acc 60 >>= print) print
accountDeposit acc 40
accountWithdraw acc 60
accountBalance acc >>= print
acc2 <- makeAccount 100
Newer Posts