Hi Jim,
This update speed-up function calls, subroutine calls, and gosubs.
for x=1 to 1000000 gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a:gosub a next x print msec end a: return
Results: 3300ms vs 11500ms
Also, introducing "Unexpected RETURN" error.
print 1 return print 2
Before: Exits without warning at line 2
After: Throw the error message "ERROR on line 2: Unexpected RETURN." and exits.
This message is very useful in a real program to understand what is happening.
#do some stuff gosub routine #do some stuff call sub() #do some stuff gosub routine #do some stuff call sub() subroutine sub() print "This is SUBROUTINE" end subroutine print "program successfully get here" routine: print "This is GOSUB" return print "but never here..." #do some stuff
Respectfully,
Florin Oprea