On Fri, 10 Apr 2009 12:57:20 -0400
Richard Ward <row...@mac.com> wrote:

> My last post got me thinking about weaning myself from macpas
> mode. One of the statements I have found quite useful is the macpas
> defined "return" statement which is used to return the function value
> and exits immediately from inside any nested block.   Has there been
> any thought or discussion about incorporating "return" into the main  
> language?  For me, it simplifies writing functions considerably and  
> makes the code easier to read/understand - even if it just replaces
> a simple function assignment statement at the end of the function.  -
> R
> 
> This
>    ...
>    return x;
> end;
> 
> vs this
>    ...
>    funcname := x;
> end;

exit(x); can be used in mode objfpc.


Mattias
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to