Page History
...
Use GoSub and Return rather than GoTo for branching to and from subroutines. GoSub and Return make structured programming easier to follow.
See also
GoTo, On...GoSub, On...GoTo, Return
Example
Code Block |
---|
/* The following code fragment shows how to branch to internal subroutines, as well as how to return execution to the main program. */ Main: If Len(InvoiceAmount) Then Discount = .10 ;* ten percent GoSub FindTotal End Else GoSub PrepareInvoice End Return FindTotal: * processing here... Return PrepareInvoice: * processing here... Return |