RosettaCodeData/Task/Use-another-language-to-call-a-function/Phix/use-another-language-to-call-a-function.phix
2016-12-05 23:44:36 +01:00

10 lines
325 B
Text

constant Here_am_I = "Here am I"
function Query(atom pData, atom pLength)
integer len = peekNS(pLength,machine_word(),0)
if poke_string(pData,len,Here_am_I) then
return 0
end if
pokeN(pLength,length(Here_am_I)+1,machine_word())
return 1
end function
constant Query_cb = call_back(routine_id("Query"))