01-03-2021, 05:03 PM
(01-03-2021, 12:44 AM)patters Wrote: I had originally been returning the amended string from the FUNCTION using RETURN, which is no longer necessary when using BYREF.
I had deleted the RETURN from my code, but I forgot that I had declared the function AS STRING, which Boriel quickly spotted.
I needed to delete that from the end of the FUNCTION declaration, since I was no longer returning anything. Once that was done the code was stable.
To avoid this error condition I presume a compiler check is needed for FUNCTION type declarations when nothing is being RETURNed. Perhaps it should require such a FUNCTION to be changed to a SUB instead. I've done this in my code since I noticed the compiler was defaulting the FUNCTION type to float when the declaration was removed.
Yes, I'm working on it. This is a bit harded than it sounds as I was planning to start code-analysis for v1.15 onwards. Anyway, I'll add little code analysis now.