This is relocated and reworded from a post in the QNA forum.
I have several custom statements which I want to offer as functions, presumably using the call( function.
I keep getting error messages when I enter stuff into the Custom Functions (User) database. I thought they might relate to my custom statement so I tried making a custom function of an existing statement (arrayintegersort), setting it up in the Custom Functions (User):List form, as follows:
Under Name, I entered srt(thearray,thesep)
In Body, I entered call("_ArrayLib",“arrayintegersort”,thearray,thesep)
In test data I entered "6,8,2,5,8",","
Tabbing through to the end, there are no errors but no result is calculated.
If I capitalise the statement name to
call("_ArrayLib",“ARRAYINTEGERSORT”,thearray,thesep)
I get a “run time error in call( procedure” message
I tried using the full path to _ArrayLib, as in
call(folderpath(info("panoramafolder")) +
"Extensions:Libraries:_ArrayLib","arrayintegersort",thearray,thesep)
but the message stayed the same. If I capitalise the statement name with a full path name,
call(folderpath(info("panoramafolder")) +
"Extensions:Libraries:_ArrayLib","ARRAYINTEGERSORT",thearray,thesep)
there are no error messages but again, no result is calculated.
What’s wrong with this code and what’s the solution to creating a function for a custom statement in a database called “Maths” in the Panorama Libraries folder?
michael