On 17.03.2013 04:07, 印場 乃亜 wrote:
I think having functions/procedures with no arguments callable with 
procedurename() is un-pascal-like as well, but it hardly bothers me that FPK 
allows it.  Just because I don't love it doesn't mean others don't.  (There is 
a lot of C like syntax that has creeped into FPK, but I assume that'S either 
because it was easy to implement and a few people wanted it, or because it made 
porting C stuff to Pascal easier).

The reason that FPC allows to call parameterless functions and procedures with "()" is because Delphi (and maybe TP) allows it as well. For procedure/function variables (in non-Delphi modes) it is required however, because this way the compiler can know for sure that a procvar is called instead of just being used as a normal variable.

Regards,
Sven

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

Reply via email to