polserver/testsuite/escript/func/funcref01.src
turleypol e54d5144ba FunctionObject doc
fixed parser to allow functionobjects directly as function paraeters
increased ecompile versionnumber to force recompilation
corrected fileaccess.cfg: without directory entry behaves like before
giving full access
2018-02-06 21:38:07 +01:00

26 lines
369 B
Text

function test(c)
return("works"+c);
endfunction
function copy(c)
print(c.call("copy"));
endfunction
program t()
var f:=@test;
var res:=f.call("direct");
copy(f);
print("res "+res);
print(@test);
copy(@test);
if (f)
print("error");
else
print("funcref is always false");
endif
// should be packet to uninit
print(pack(f));
print(unpack(pack(f)));
endprogram