Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2004-01

replacing BEGIN and END?

5 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Laurent Cocea

Hi all-

Do you guys think there might be a way, either at this time or in the near future, to replace `BEGIN' with `{' and `END' with `}' in FPC code, and still be able to successfully compile it? Thanks.

--Laurent

Reply by email

James Mills
to Laurent Cocea
Laurent Cocea wrote 5 lines
Hi all- Do you guys think there might be a way, either at this time or in the near future, to replace `BEGIN' with `{' and `END' with `}' in FPC code, and still be able to successfully compile it? Thanks.

Definately not! This is what makes C look so damn ugly.

cheers
James

Reply by email

Jan Je/lowicki
Show quoted text 17 lines
To: From: "Laurent Cocea" Subject: [fpc-pascal]replacing BEGIN and END? Send reply to: Date sent: Wed, 07 Jan 2004 21:41:35 -0800 (PST) Hi all- Do you guys think there might be a way, either at this time or in the near future, to replace `BEGIN' with `{' and `END' with `}' in FPC code, and still be able to successfully compile it? Thanks. --Laurent _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Here it is:

echo /* test*/ program test; {writeln('hello'); }. |\ sed -e"s/{/begin/g" | sed -e"s/}/end/g" | fpc -o hello

Enjoy, but remember that there are also comments.

Jan Jelowicki

------------------------------------------------------------------- Wroclaw University of Agriculture Akademia Rolnicza we Wroclawiu Department of Mathematics Katedra Matematyki -------------------------------------------------------------------

Reply by email

Laurent Cocea

Hey, I've been programming in Pascal on virtually all platforms and OSes for almost 20 years now and I don't plan on switching to C anytime soon. It's just that, for the last two years, I've been also using Perl and found the `{...}' syntax to be quite handy. I was hoping an alternative block syntax might be implemented in FPC, especially since for comments one can also use `(*...*)'. But it's okay, I got the general idea... :)

--Laurent

Reply by email