8 lines
277 B
Text
8 lines
277 B
Text
# A+B, in LIL
|
|
# Requires lil shell readline routine
|
|
set in [readline]
|
|
set A [index $in 0]
|
|
set B [index $in 1]
|
|
if [expr $A < -1000 || $A > 1000] { print "A out of range: $A"; exit 1 }
|
|
if [expr $B < -1000 || $B > 1000] { print "B out of range: $B"; exit 1 }
|
|
print [expr $A + $B]
|