Advertisement
Guest User

Nim proc issues

a guest
Dec 24th, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nim 0.36 KB | None | 0 0
  1. #create my first proc
  2.  
  3. proc mainMenu() =
  4.   echo("1) Print hello")
  5.  
  6.   input = readLine(stdin)
  7.  
  8.   if input == "1":
  9.     echo ("hello")
  10.   else:
  11.     echo("not an option")
  12.  
  13. # create my second proc
  14.  
  15. proc menuTwo() =
  16.   echo("1) return to main menu")
  17.   option = readLine(stdin)
  18.      
  19.   if option == "1":
  20.     mainMenu()
  21.   else:
  22.     echo("Not an option")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement