Greed/Wren: Difference between revisions

m
Fixed syntax highlighting.
(Added code.)
 
m (Fixed syntax highlighting.)
Line 1:
===Code===
{{trans|Go}}
{{libheader|ncurses}}
Line 7:
{{works with|Ubuntu 20.04}}
An embedded script so we can use the ncurses library.
<langsyntaxhighlight lang="ecmascript">/* greed.wren */
 
import "./dynamic" for Struct
Line 216:
NC.echo()
NC.endwin()
NC.cursSet(1)</langsyntaxhighlight>
<br>
We now embed this in the following C program, build and run it.
<langsyntaxhighlight lang="c">/* gcc greed.c -o greed -lncurses -lwren -lm */
 
#include <stdio.h>
Line 431:
free(script);
return 0;
}</langsyntaxhighlight>
9,479

edits