Re: Euphoria features

new topic     » goto parent     » topic index » view thread      » older message » newer message

Everett Williams writes:

> In addition, nobody has addressed my question
> about the scoping effects of gotos.

I'd assume the following constraints:

1. GOTOs limited to the same routine. I arbitrarily disallow in-line GOTOs.

2. Only forward GOTOs:

    foo:
    -- NOT ALLOWED
    goto foo:

3. You can leap out of block structures:

    for i = 1 to 10
      for j = 1 to 10
        if x = 12 then
          goto label:
        end if
      end for
    label:
    end for

4. You can leap into block structures:

    goto label:
    for i = 1 to 10 do
    -- NOT ALLOWED
    label:

Seems to me that this allows the goal of leaping out of blocks of logic.

-- David Cuny

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu