Guest User

Untitled

a guest
Dec 10th, 2017
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. pi@raspberrypi:~/nim $ e test.nim
  2.  
  3. 1 import streams
  4. 2 import parsecfg
  5. 3
  6. 4 let filename = "/home/pi/nim/config.ini"
  7. 5 let file = filename.open()
  8. 6 let filestream = file.newFileStream()
  9. 7 var p: CfgParser
  10. 8 p.open(filestream, filename)
  11. 9 echo p.filename
  12.  
  13. pi@raspberrypi:~/nim $ e test.nim
  14. pi@raspberrypi:~/nim $ nim-0.17.2/bin/nim c --opt:speed test.nim
  15. Hint: used config file '/home/pi/nim/nim-0.17.2/config/nim.cfg' [Conf]
  16. Hint: system [Processing]
  17. Hint: test [Processing]
  18. Hint: streams [Processing]
  19. Hint: parsecfg [Processing]
  20. Hint: hashes [Processing]
  21. Hint: strutils [Processing]
  22. Hint: parseutils [Processing]
  23. Hint: math [Processing]
  24. Hint: algorithm [Processing]
  25. Hint: lexbase [Processing]
  26. Hint: tables [Processing]
  27. test.nim(9, 7) Error: undeclared field: 'filename'
Advertisement
Add Comment
Please, Sign In to add comment