import os, winlean
echo paramCount(), " ", paramStr(1)
could not import: CreateSymbolicLinkW Error: execution of an external program failed
Executing this program gives the above error. I added winlean after some googling but I am not sure whether the program requires it.
c:supportUtils>nimrod compile --run buildUtils.nim c:program filesnimrodconfignimrod.cfg(37, 2) Hint: added path: 'C:Documents and SettingsvonH.babelpkgs' [Pat h] Hint: used config file 'C:Program FilesNimrodconfignimrod.cfg' [Conf] Hint: system [Processing] Hint: buildutils [Processing] Hint: os [Processing] Hint: strutils [Processing] Hint: parseutils [Processing] Hint: times [Processing] Hint: winlean [Processing] "C:Program FilesNimroddistmingwbingcc.exe" -o c:supportutilsbuildutils.exe c:supportutilsnimcachewinlean.o c:supportutilsnimcachetimes.o c: supportutilsnimcacheparseutils.o c:supportutilsnimcachestrutils.o c:sup portutilsnimcacheos.o c:supportutilsnimcachesystem.o c:supportutilsnimc achebuildutils.o Hint: operation successful (13750 lines compiled; 0.734 sec total; 13.133MB) [SuccessX] c:supportutilsbuildutils.exe could not import: CreateSymbolicLinkW Error: execution of an external program failed
Thanks. The --deadCodeElim:on option worked.
How would I read the parameters into an array and iterate over them, or just iterate directly?
I know it should be quite easy, but I just want to get an idea of Nimrod's features.
Yes, you have to iterate over paramCount() using paramStr(x).
Or you can use helper modules like argument_parser or comandeer, both available as easy to install babel packages.