Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revision Both sides next revision
gosubreturn [2019/05/07 13:45]
neils created
gosubreturn [2019/05/07 13:45]
neils
Line 4: Line 4:
  
   gosub <​label>​   gosub <​label>​
-  ​label: +  return
-    [statements] +
-    ​return+
  
-The ''​GOSUB''​ command calls a subroutine marked by a label. Return will pass control back to the caller. Nesting subroutines are supported (`GOSUBand `RETURNcompiles to just plain `JSRand `RTS`, nothing fancy). Stack overflow is not checked in runtime, but is quite unlikely to encounter. Example:+The ''​GOSUB''​ command calls a subroutine marked by a label. Return will pass control back to the caller. Nesting subroutines are supported (''​GOSUB'' ​and ''​RETURN'' ​compiles to just plain ''​JSR'' ​and ''​RTS''​, nothing fancy). Stack overflow is not checked in runtime, but is quite unlikely to encounter. Example:
  
  rem ** subroutines **  rem ** subroutines **