echo("What's your name? ") var name: string = readLine(stdin) echo("Hi, ", name, "!") var o:TMyObject o.iField = 22 echo o.iField
E:Nimrodpnim1nim1>b
E:Nimrodpnim1nim1>nimrod c --cc:vcc --compileOnly --debugger:off -d:release
e:nimrodconfignimrod.cfg(37, 2) Hint: added path: 'C:UsersRv.babelpkgs' [Path] Hint: used config file 'e:Nimrodconfignimrod.cfg' [Conf] Hint: system [Processing] Hint: hallo [Processing] Hint: operation successful (8335 lines compiled; 0.393 sec total; 11.112MB) [Suc cessX]
E:Nimrodpnim1nim1>
gnerated code:
You need to wrap your code in ``` .. ```
Example:
```nimrod
echo("hello world")
```
Will show up as:
echo("hello world")
(Remove the nimrod if you don't want nimrod syntax highlighting.)
type
TMyObject {.final, pure, acyclic.} = object
iField: int
# This is a comment
echo("What's your name? ")
var name: string = readLine(stdin)
echo("Hi, ", name, "!")
var o:TMyObject
o.iField = 22
echo o.iField
nimrod c --cc:vcc --compileOnly --debugger:off -d:release --embedsrc hallo.nim
N_NOINLINE(void, halloInit)(void) {
NimStringDesc* LOC1;
//echo("What's your name? ")
printf("%s\015\012", (((NimStringDesc*) &TMP5))->data);
//var name: string = readLine(stdin)
asgnRefNoCycle((void**) &name_83009, readline_10484(stdin));
//echo("Hi, ", name, "!")
printf("%s%s%s\015\012", (((NimStringDesc*) &TMP11))->data, (name_83009)->data, (((NimStringDesc*) &TMP12))->data);
//o.iField = 22
o_83013.Ifield = 22;
//echo o.iField
//echo o.iField //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ? 2 times ?
LOC1 = 0;
LOC1 = nimIntToStr(o_83013.Ifield);
printf("%s\015\012", (LOC1)->data);
}
nimrod version x86 0.9.4