Terminal control/Positional read: Difference between revisions
Terminal control/Positional read (view source)
Revision as of 12:09, 13 February 2024
, 3 months ago→{{header|Wren}}: Minor tidy
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 651:
{{libheader|ncurses}}
An embedded program so we can ask the C host to communicate with ncurses for us.
<syntaxhighlight lang="
import "random" for Random
Line 711:
<br>
We now embed this in the following C program, compile and run it.
<syntaxhighlight lang="c">
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Line 838 ⟶ 840:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
|