RosettaCodeData/Task/Call-a-function-in-a-shared.../Jsish/call-a-function-in-a-shared...

27 lines
750 B
Plaintext

identification division.
program-id. sample as "Jsi_Initbyjsi".
environment division.
configuration section.
special-names.
call-convention 0 is extern.
repository.
function all intrinsic.
data division.
linkage section.
01 jsi-interp usage pointer.
01 rel usage binary-long.
procedure division using by value jsi-interp rel.
sample-main.
if rel equal zero then
display "GnuCOBOL from jsish load of " module-source()
" and cobc -m -fimplicit-init" upon syserr
goback
end-if
display "Called again with: " jsi-interp ", " rel upon syserr
goback.
end program sample.