05-20-2025, 11:21 PM
I have never created a Function, but always used Sub for repeated operations. I'm trying to find how to create and apply Functions, and what, if any, are their advantages (in my SIMPLE programmes) over Subs. I've created these few lines to experiment, but get no results from the Function.
What am I doing wrong?
Code: (Select All)
Common Shared x, x$
x = 5: x$ = "ABC"
Print "Checkfunction returns";
Print CheckFunction$(x, x$)
CheckSub
Print "CheckSub returns"; x, x$
Function CheckFunction$ (x, x$)
x = x * 3: x$ = x$ + "DEF"
End Function
Sub CheckSub
x$ = x$ + x$
x = x + x
End Sub
What am I doing wrong?

Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, Western Australia.) 
Please visit my Website at: http://oldendayskids.blogspot.com/

Please visit my Website at: http://oldendayskids.blogspot.com/