File modification time: Difference between revisions
m
→{{header|Wren}}: Minor tidy
(Initial FutureBasic task solution added) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 1,518:
{{libheader|Wren-date}}
As there is currently no way for Wren-cli to get or set file modification times, we instead use an embedded script so the C host can do this for us.
<syntaxhighlight lang="
import "./date" for Date
Line 1,553:
<br>
We now embed this in the following C program, build and run it:
<syntaxhighlight lang="c">/* gcc
#include <sys/stat.h>
Line 1,691:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
|