[fpc-pascal] Speed

L L at z505.com
Wed Oct 31 03:13:01 CET 2007


> 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.



More information about the fpc-pascal mailing list