RETURN command?


Results 1 to 22 of 22

Thread: RETURN command?

Threaded View

  1. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default Re: RETURN command?

    I do not see any safety problem with multiple entries in a sub.

    It is up to the programmer to write correct code and debug it. Say you want 5*6 and accidentally write 5**6. This is valid in PBP but whose fault is now. Compiler's?

    Also valid is the conditional exit from a sub with many returns that depend on the conditions. Not efficient programming but for the sake of example:

    Code:
    mysub:
        if x=3 then
            y=4
            RETURN
        elseif x=5 then
            y=6
            RETURN
        endif
    y=10
    return
    Ioannis
    Last edited by Ioannis; - 12th March 2022 at 10:38.

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