RETURN

Contents


Return is used to return from a sub-programme called by Gosub to the instruction following the Gosub call.

 

Syntax

Return

 

Examples

   # Calling sub-programmes: this part of the routine will be called
   # by Gosub
    TEST_GOSUB
       I = 1
       Gosub PRINT_VALEUR
       Gosub INCREMENTER
       Gosub PRINT_VALEUR
       Gosub INCREMENTER
       Gosub PRINT_VALEUR
   
Return      :# return to calling
    AFF_VALEUR
       Infbox "The value of I is "+I
   
Return     :# used to quit PRINT_VALEUR
    INCREMENTER
       I += 1
   
Return

 

Description and comments

Return is used to go back to the instruction following the Gosub.

The instructions are executed schematically in the following sequence (the figures in parentheses giving the sequence):

(1)Gosub ETIQUETTE

(2) $ETIQUETTE

(3) Sub-programme instructions

(4) Return

(5) Instructions AFTER Gosub
(6) End

 

Comment

Return from a Call or a label called when entering a mask is made by the End instruction and not byReturn.

 

Associated errors

Error

Description

ERRET (32)

Return without prior Gosub.

 

Associated key words

GOSUB - CALL - END - SUBPROG


CONTENTS


Copyright © Sage 1999 - 2007