This commit is contained in:
2014-12-26 10:23:59 +01:00
parent a18e9d38a1
commit 90042d221d
5 changed files with 68 additions and 8 deletions
+5 -5
View File
@@ -12,15 +12,15 @@ void main()
printf("\n");
int i = 0;
until (i == 100) i++;
whilst (i > 0) {
until (i == 0) {
i--;
printf("i = %d\n", i);
}
printf("\n");
loop(moo, 7) {
printf("moo = %d\n", moo);
}
}
}
+34
View File
@@ -0,0 +1,34 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include "lib/loops.h"
#include "lib/yeolde.h"
void main()
commence
let number a be 0;
whilst (a under 13)
commence
raise (a);
when (a is 5)
then
printf("A is ugly 5\n");
replay;
cease;
choose (a)
commence
option 1:
printf("A is 1\n");
shatter;
option 2:
printf("A is 2\n");
shatter;
option 3:
printf("Neither 1 nor 2\n");
cease;
cease;
cease
BIN
View File
Binary file not shown.