Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function to edit a string (*solved*)
#9
(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.
Reply


Messages In This Thread
Function to edit a string (*solved*) - by patters - 12-29-2020, 05:13 PM
RE: Function to edit a string - by patters - 12-29-2020, 06:37 PM
RE: Function to edit a string - by boriel - 12-30-2020, 08:26 AM
RE: Function to edit a string - by patters - 12-30-2020, 12:14 PM
RE: Function to edit a string - by boriel - 12-30-2020, 06:01 PM
RE: Function to edit a string - by boriel - 01-02-2021, 02:14 PM
RE: Function to edit a string - by patters - 01-02-2021, 07:35 PM
RE: Function to edit a string - by patters - 01-03-2021, 12:44 AM
RE: Function to edit a string - by boriel - 01-03-2021, 05:03 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)