Posted 16 May 2015 - 03:12 AM
                Hello guys, i have one doubt, lets say i have this code:
I want to know what is the difference when i use various if instead of elseif ?
Like this:
How ComputerCraft will "READ" in both of cases?
                
                    
	  if rs.getInput("front") and rs.getInput("back") then
				monitor.setCursorPos(11,3)
		elseif rs.getInput("front") then
				monitor.setCursorPos(11,3)
		elseif rs.getInput("back") then
				monitor.setCursorPos(11,3)
		else
				monitor.setCursorPos(9,3)
		end
I want to know what is the difference when i use various if instead of elseif ?
Like this:
	  if rs.getInput("front") and rs.getInput("back") then
				monitor.setCursorPos(11,3)
		end
		if rs.getInput("front") then
				monitor.setCursorPos(11,3)
		end
		if rs.getInput("back") then
				monitor.setCursorPos(11,3)
		else
				monitor.setCursorPos(9,3)
		end
How ComputerCraft will "READ" in both of cases?
Edited on 16 May 2015 - 01:13 AM
                
             
         
                