[fpc-devel] Declare variables inside the code

kingbizugo at gmail.com kingbizugo at gmail.com
Tue May 10 18:26:59 CEST 2011


*I have been playing on other languages sometimes and I see some 
features that speed-up a lot the code creating. I'm posting here one, I 
want to see what you think about it.
*
*Good:* fast algorithm testings, code creating
*Bad?:* not a standard of the pascal language

/*method* MyMethod;
*var* A, B: Integer;
*begin
*
{ Simple sample of a variable inside the method begin/end near to a 
for-loop }
*var* I: Integer;
*for* I := a *to* b *do*...

{ Or even }
*for* *var* J: Integer := a *to* b *do*...
{ This is normal on languages like C++ and Java }

/*/end;/
*
*What do you think about*?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20110510/dc1d5ac9/attachment.html>


More information about the fpc-devel mailing list