Re: goto: it's conceded

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

To be explicit, in case I wasn't clear (which I wasn't!!!)...

while cond1 label "toplevel" do
  . . .
  while cond2 do
    . . .
    while cond3 label "anotherpoint" do
      . . .
      while cond4 do
        . . .
        if abc then
          exit "toplevel"
        else
          continue "anotherpoint"
        end if
      end while
    end while
  end while
end while

Without labels or GOTOs becomes...

procedure example()   
  while cond2 do
    ...
    while cond3 do
      ...
      if cond4 then
        ...
      end if
      if abc then return end if
    end while
  end while
end procedure

while cond1 do
  ...
  example()
end while


"Science is the belief in the ignorance of experts." - Richard Feynman

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

Search



Quick Links

User menu

Not signed in.

Misc Menu