[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

End labels



I think we can't write like that something in PCAL:
 
begin algorithm ....
   ....
 
iflbl:
if FEOF(x) = EOF
then
  ret := 0;
  goto endlbl;
end if
endiflbl:
ret := 1
endlbl: <---- Here is the problem
 
end algorithm
 
 
 
Obviously we can replace "endlbl:" by "endlbl: ret := ret" or another innocent step but it is less good.
 
(I know that in this case I might use an "else" but the point is the possibility to have a label with no
_expression_ behind to jump to the end of an algorithm when we want to modelize a multi return
routine.)
 
--
FL