> If the code is more efficient with a "goto", this is sufficient to
> justify its use.

Or if the code is clearer, for example to avoid deep nesting...

Or to make clean errors and debugging log files easier:

exit; .// default

//else

error1:
begin
  debugln('error1');
  exit;
end;

error2
begin
  debugln('error2');
  exit;
end;

error3
begin
  {$IFDEF DEBUG}debugln('error3');{$ENDIF}
  exit;
end;

This way that line noise stays out of the main algorithm code.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to