Host introspection: Difference between revisions
m
→{{header|Wren}}: Minor tidy
Naveen.phys (talk | contribs) (Equivalence statement is obsolete in Fortran 2018, so the version is one liner using the ISHFT intrinsic.) |
m (→{{header|Wren}}: Minor tidy) |
||
(One intermediate revision by one other user not shown) | |||
Line 373:
=={{header|Fortran}}==
{{works with|Fortran|90 and
<syntaxhighlight lang="fortran"> integer :: i
character(len=1) :: c(20)
Line 1,428:
{{trans|C}}
As this information cannot be reliably obtained via Wren CLI, we instead embed a Wren script in a C application and ask the host program to get it for us.
<syntaxhighlight lang="
class C {
Line 1,518:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
|