Return (value) exits a function immediately and returns a value if specified (the value is normally an int, but can be a float or string IF you specify in the Function <function name><return type(not required)>(<parameters> ) in which <return type> is one of the following:
% or none allows an Int to be returned
# allows a Float to be returned
$ allows a String to be returned
.customtype allows a custom type to be returned
GoSub is a bad way to do things - I don't know why GfK brought it up. Use Functions. Yes, Return can exit a For/Next or Repeat/Until loop within a function - no problem.
Blitz is a very robust language, it's a lot harder to crash than other languages. Go ahead and try things. (Don't use WritePixelFast to draw off of an image, VERY BAD things can happen - like total computer lockup. And don't make endless loops - always add an escape route like "If KeyHit(1) Then Exit") If you have questions, look in the help. (Yes, I looked and the help doesn't say anything about your question. So yes, coming here was a good thing to do.)
Good luck programming! Have fun!
Just out of curiousity...why do you ask?
% or none allows an Int to be returned
# allows a Float to be returned
$ allows a String to be returned
.customtype allows a custom type to be returned
GoSub is a bad way to do things - I don't know why GfK brought it up. Use Functions. Yes, Return can exit a For/Next or Repeat/Until loop within a function - no problem.
Blitz is a very robust language, it's a lot harder to crash than other languages. Go ahead and try things. (Don't use WritePixelFast to draw off of an image, VERY BAD things can happen - like total computer lockup. And don't make endless loops - always add an escape route like "If KeyHit(1) Then Exit") If you have questions, look in the help. (Yes, I looked and the help doesn't say anything about your question. So yes, coming here was a good thing to do.)
Good luck programming! Have fun!
Just out of curiousity...why do you ask?