05-21-2025, 12:39 AM
Functions can be used inside functions so you can do multiple functions in a single line of code.
A sub has to be run and the results run some place else.
Look at all the built in functions we use in the QB64 language, for instance LEN(myString$) or Mid$.
You can do this:
Function LastLetter$(mystring$)
LastLetter$ = Mid$(mystring$, Len(mystring$), 1)
End Function
Now LastLetter$ might be used in another function or sub or by main code.
A sub has to be run and the results run some place else.
Look at all the built in functions we use in the QB64 language, for instance LEN(myString$) or Mid$.
You can do this:
Function LastLetter$(mystring$)
LastLetter$ = Mid$(mystring$, Len(mystring$), 1)
End Function
Now LastLetter$ might be used in another function or sub or by main code.
b = b + ...