Starting a web browser: Difference between revisions

m
m (→‎{{header|Wren}}: Wren-trait -> Wren-iterate)
m (→‎{{header|Wren}}: Minor tidy)
 
Line 1,054:
 
The Wren code is based in part on the Nim example and uses the same color scheme.
<syntaxhighlight lang="ecmascriptwren">/* starting_web_browserStarting_a_web_browser.wren */
 
import "./pattern" for Pattern
Line 1,179:
<br>
We now embed this in the following C program, compile and run it.
<syntaxhighlight lang="c">/* gcc starting_web_browserStarting_a_web_browser.c -o starting_web_browserStarting_a_web_browser -lwren -lm */
 
#include <stdio.h>
Line 1,314:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "starting_web_browserStarting_a_web_browser.wren";
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
9,482

edits