Pooh program example 16-load-extension-library.p

Test 16-load-extension-library.p

Source of programm

# load an extension library written in C and call exported function

loadextension 'libextlibexample'


c = addnumbers( ~a 42 ~b 3 )
println( ~msg c )

Standard output for 16-load-extension-library.p

45

Trace output for 16-load-extension-library.p

006|... = addnumbers( ~a 42 ~b 3 )...
006|c = addnumbers( ~a 42 ~b 3 ):45
007|println( ~msg c:45 )...