[fpc-devel] Silly syntax games
L505
fpc505 at z505.com
Fri Jun 10 01:41:50 CEST 2005
For all the keyboard wussies out there:
Note, for all you that are afraid of long reduntant begin/end typing, you could go
{$define beg:=begin}
Or
program Project1;
{$mode objfpc}{$H+}
{$define b:= begin }
{$define e:= end }
{$define e:=end }
var
iLoc:integer;
b
b
for iLoc:= 1 to 60 do
writeln('test');
e;
e.
But.. for all the C wussies out there.. this won't work :
program Project1;
{$mode objfpc}{$H+}
{$define {:= begin} //this works
{$define }:= end. } //this doesn't work
{$define }:= end; } //this doesn't work
var
iLoc:integer;
{
for iLoc:= 1 to 60 do
writeln('test')
}
........So how do you escape the } in a define?
More information about the fpc-devel
mailing list