Greed/Wren: Difference between revisions

m
Minor tidy
m (Fixed syntax highlighting.)
m (Minor tidy)
 
Line 7:
{{works with|Ubuntu 20.04}}
An embedded script so we can use the ncurses library.
<syntaxhighlight lang="ecmascriptwren">/* greedGreed.wren */
 
import "./dynamic" for Struct
Line 219:
<br>
We now embed this in the following C program, build and run it.
<syntaxhighlight lang="c">/* gcc greedGreed.c -o greedGreed -lncurses -lwren -lm */
 
#include <stdio.h>
Line 410:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "greedGreed.wren";
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
9,476

edits