On Monday 18 November 2002 11:17 am, Prof. A Olowofoyeku (The African Chief) wrote:
Hi all
Newer versions of Delphi (IIRC, from v4.0 onwards) permit a somewhat C-like procedure/function call - e.g., if you have these routines: function foo : integer; procedure bar;
You can call them like this; i := foo; // GPC expects this bar; // -- ditto --
j := foo (); // Delphi accepts, but GPC doesn't bar(); // -- ditto --
I thing that it would be nice if GPC could support the addition of the brackets, but there may well be strong reasons for not doing so (for one, it is un-Pascalish). I also do not know whether it would be easy or difficult to implement. I fully appreciate that there are many other things that are far greater priorities - but if it could be done easily then should it? I find that many Delphi programmers are increasingly doing this (probably those who came from a C/C++ background) and so it gets a bit cumbersome to deal with them when trying to port free Delphi code to GPC.
Any comments?
I personally don't like it that much :) However I agree that it maybe usefull for porting purposes. Its probably pretty easy due to the fact that you can already pass varibles via parameter(? or is it value.... I forget my Pascal education :) ). If it is added, perhaps a compile warning could be generated for each instance of the usage of the ()'s this would let people know that its not "real" Pascal. -- Thanks, Andrew McCall Internet/Linux System Administrator I.C.T. Division Oldham MBC Civic Centre West Street Oldham OL1 1UU Tel : 0161 911 3990 Fax : 0161 911 3998 Email : it.andrew.mccall@oldham.gov.uk ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.oldham.gov.uk **********************************************************************