you really should read the help.
[b:f7520fede1]When you use CONFIG SUBMODE=NEW, most behaviour is changed :
- there is no need to DECLARE a sub/function before you call it. But, the actual sub/function code must be placed before the actual call!
[/b:f7520fede1]
this means that you either need to use some $include or when you leave the sub in the main program, you need to have the code before the actuall call :
sub test()
end sub
test '
call test 'same as test
in this sample it is correct since the sub implementation is before the actuall call.
if you do call the sub/function without a DECLARE or without the code preceding it, the compiler does not know the sub/function.
RETURN : a bad idea. it can be done when you do not pass parameters. only use return when there is a matching label that is called like :
sub test()
print "test"
gosub abc
exit sub
abc:
print "abc"
return
End Sub
↧