Procedures
# define the procedure
proc sayHello() =
echo "Hi!"
sayHello() # calls the procedureproc ask(msg: string): bool =
if msg == "I love Nim": return true
else: return false
echo ask("I love Nim") # return trueLast updated
Was this helpful?