fork download
  1. # your code goes here
  2.  
  3. proc changeString(s: var string) =
  4. s = "WTF"
  5.  
  6. proc doStuff(s: string) =
  7. echo s
  8. changeString(s)
  9.  
  10. proc main() =
  11. var s1 = "Test"
  12. doStuff(s1)
  13.  
  14. if s1 = "WTF":
  15. echo "Lol shit"
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.nim(8, 16) Error: for a 'var' type a variable needs to be passed
stdout
Standard output is empty