(12-16-2022, 04:56 PM)Kernelpanic Wrote: Thanks, Pete! I would not have thought of the "$" next to the function.
Maybe you and I should campaign so the "AS TYPE" clause could be put at the end of a function header. Do you use Freebasic or Visual Basic? You have to try to remember QB64(PE) still requires the type sigils, whatever they are, right after a function's name in the header, and nothing except "STATIC" right after the closing parenthesis of the parameter list.
It should have been easy to remember that any string function in QB64(PE) must carry the dollar sign at the end of the name! Like "MID$", "STR$", "SPACE$" and so on.
Instead of:
function addtwo (one as long, two as long) as long
you must write it:
function addtwo& (one as long, two as long)
You write code in the other BASIC, and then you should load it into the QB64 IDE, which should flag the errors of "AS TYPE". Then you should know which sigil for which type.
https://qb64phoenix.com/qb64wiki/index.p...able_Types
EDIT: Why isn't the "DECLARE" line flagged as an error? Maybe it's what allows the user's function to be used without the dollar sign. (facepalm)