Skip to content

Instantly share code, notes, and snippets.

@McPolemic
Created January 25, 2015 05:13
Show Gist options
  • Save McPolemic/da5485960c4830114cf4 to your computer and use it in GitHub Desktop.
Save McPolemic/da5485960c4830114cf4 to your computer and use it in GitHub Desktop.
A nimrod example
#include <stdio.h>
void multiprint(int times, char *message) {
for (int i = 0; i < times; i++) {
printf(message);
}
printf("\n");
}
#Run with `nimrod compile --run print.nim`
{.compile: "multiprint.c".}
proc multiprint(times: int, message: cstring) {.importc.}
# https://m.youtube.com/watch?v=FiTaK3Fyj0k
3.multiprint("alright ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment