fork download
  1. thisLetterShouldBeCapitolized = 77
  2. thisLetterShouldNotBeCapitolized = 93
  3. thisIsNotALetterItIsASpecialCharacter = 80
  4. theMessageShouldBePutOntoTheScreen = 55
  5. thisFunctionShouldRun = 12
  6. tenPlusThree = 13
  7.  
  8.  
  9. putMessageOntoScreenUsingText = function(shouldPutMessageOntoScreenUsingText, howLongIsTheMessage, theTextToPutOntoTheScreen)
  10. if shouldPutMessageOntoScreenUsingText == theMessageShouldBePutOntoTheScreen then
  11. for theCharacterWeArePuttingOntoTheScreen = 51, howLongIsTheMessage + 50 do
  12. if theTextToPutOntoTheScreen.charactersOfTextThatWeWantToPutOnTheScreen[theCharacterWeArePuttingOntoTheScreen - 50][2] == thisLetterShouldBeCapitolized then
  13. io.write(string.upper(string.char(theTextToPutOntoTheScreen.charactersOfTextThatWeWantToPutOnTheScreen[theCharacterWeArePuttingOntoTheScreen - 50][1])))
  14. elseif theTextToPutOntoTheScreen.charactersOfTextThatWeWantToPutOnTheScreen[theCharacterWeArePuttingOntoTheScreen - 50][2] == thisLetterShouldNotBeCapitolized then
  15. io.write(string.lower(string.char(theTextToPutOntoTheScreen.charactersOfTextThatWeWantToPutOnTheScreen[theCharacterWeArePuttingOntoTheScreen - 50][1])))
  16. elseif theTextToPutOntoTheScreen.charactersOfTextThatWeWantToPutOnTheScreen[theCharacterWeArePuttingOntoTheScreen - 50][2] == thisIsNotALetterItIsASpecialCharacter then
  17. io.write(string.char(theTextToPutOntoTheScreen.charactersOfTextThatWeWantToPutOnTheScreen[theCharacterWeArePuttingOntoTheScreen - 50][1]))
  18. end
  19. end
  20. end
  21. end
  22.  
  23. theHelloWorldTextWeWantToPutOnTheScreen = {
  24. charactersOfTextThatWeWantToPutOnTheScreen = {
  25. [1] = {104, thisLetterShouldBeCapitolized},
  26. [2] = {101, thisLetterShouldNotBeCapitolized},
  27. [3] = {108, thisLetterShouldNotBeCapitolized},
  28. [4] = {108, thisLetterShouldNotBeCapitolized},
  29. [5] = {111, thisLetterShouldNotBeCapitolized},
  30. [6] = {44, thisIsNotALetterItIsASpecialCharacter},
  31. [7] = {32, thisIsNotALetterItIsASpecialCharacter},
  32. [8] = {119, thisLetterShouldNotBeCapitolized},
  33. [9] = {111, thisLetterShouldNotBeCapitolized},
  34. [10] = {114, thisLetterShouldNotBeCapitolized},
  35. [11] = {108, thisLetterShouldNotBeCapitolized},
  36. [12] = {100, thisLetterShouldNotBeCapitolized},
  37. [13] = {46, thisIsNotALetterItIsASpecialCharacter},
  38. },
  39. }
  40.  
  41. theFunctionThatRunsWhenTheProgramIsStarted = function(shouldThisFunctionRun)
  42. if shouldThisFunctionRun == thisFunctionShouldRun then
  43. putMessageOntoScreenUsingText(theMessageShouldBePutOntoTheScreen, tenPlusThree, theHelloWorldTextWeWantToPutOnTheScreen)
  44. end
  45. end
  46.  
  47. theFunctionThatRunsWhenTheProgramIsStarted(thisFunctionShouldRun)
  48.  
Success #stdin #stdout 0s 2788KB
stdin
Standard input is empty
stdout
Hello, world.