Translations:Getting Started (ComputerCraft)/27/en

-- First part of the loop, lamp is off. term.clear                      -- clear the screen term.setCursorPos(1,1)            -- Put the cursor at the top left corner. print("To turn lamp on, press L.") print("To exit, press any other key.") -- Wait for user input (as a character), convert it to uppercase. event, userinput = os.pullEvent("char") userinput = string.upper(userinput)