RETURN command?


Closed Thread
Results 1 to 22 of 22

Thread: RETURN command?

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: RETURN command?

    Quote Originally Posted by HenrikOlsson View Post
    You can have one entry-point (Label) and multiple exit points (Returns)

    /Henrik.
    Hi, Enrik

    I suppose here the "right" Return is selected through some conditionnal choice ... as , once the sub is entered, the first encountered Return loads the program counter the return address memorized on top of the stack by the " Gosub " command ... so, there can't be " active " multiple returns ( thanks God ! )

    did I miss something ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,524


    Did you find this post helpful? Yes | No

    Default Re: RETURN command?

    You didn't miss anything. My point is basically that it's not as simple as just telling the compiler to count the number of GOSUB and RETURN statements and generate an error they don't match.

  3. #3
    Join Date
    May 2009
    Location
    Saint-Quentin-en-Yvelines, FRANCE
    Posts
    80


    Did you find this post helpful? Yes | No

    Red face Re: RETURN command?

    Hi,

    Frankly, I am surprised and a little bit shocked by this kind of practice.
    But it may be a matter of "cultural feeling".

    I have spent years and years in developing aerospace products. In this world where the readibility of the code and the safety are the keypoints one cannot imagine a sub with more than one entry point and more than one return point.

    This is why I was surprised that PBP does not detect a sub without a return.

    Yes, I know, most of us work in other areas or are makers or hobbyists. But good practices are good practices.

    Now, everybody is free to do what he prefers

    MikeBZH

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts