This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
ETHANATOR360's profile picture

getting more than one number

Started by ETHANATOR360, 19 February 2013 - 03:40 AM
ETHANATOR360 #1
Posted 19 February 2013 - 04:40 AM
how do you check more than one number with an if statement like
if X == 1 through 12 then
sjele #2
Posted 19 February 2013 - 04:42 AM
Like this?


if x >= 1 and x <= 12 then
  print(x.." is between 1 and 12")
end
ETHANATOR360 #3
Posted 19 February 2013 - 06:49 AM
thanks