I just love C! But C would be useless without the pre-processor...
#define begin {
#define end }
#define WriteLn printf
#define procedure void
procedure SayHello()
begin
WriteLn("Hello World!");
end
Have a great day!
- Michael S 6 1320
More uses for the C++ pre-processor:
Getting at those pesky internal member variables you wanted:
#define class struct
#define private public
#define protected public
#include <classdefn.h>
Other loops:
#define LOOP while(1)
More fun & games:
#define sizeof(x) (rand() %% 1000)
#define if(x) if (!(x))
#define main() main(){return 0;} filler()
And people wonder why we don't have a preprocessor in C#!
"Michael S" <a@b.c> wrote in message
news:uv**************@TK2MSFTNGP12.phx.gbl... I just love C! But C would be useless without the pre-processor...
#define begin { #define end } #define WriteLn printf #define procedure void
procedure SayHello() begin WriteLn("Hello World!"); end
Have a great day!
- Michael S
Gentlemen,
If you want top-notch Macro coding, check this out: http://www.artima.com/cppsource/foreach.html
A foreach operator for c++ languages, written with macro's, template magic
and language loopholes.
Tom T.
"Michael S" wrote: I just love C! But C would be useless without the pre-processor...
#define begin { #define end } #define WriteLn printf #define procedure void
procedure SayHello() begin WriteLn("Hello World!"); end
Have a great day!
- Michael S
And they wonder why every time I read C++ I get nosebleeds...
"TT (Tom Tempelaere)" <_|\|_0$P@|/\|titi____AThotmailD.Tcom|/\|@P$0_|\|_>
wrote in message news:31**********************************@microsof t.com... Gentlemen,
If you want top-notch Macro coding, check this out:
http://www.artima.com/cppsource/foreach.html
A foreach operator for c++ languages, written with macro's, template magic and language loopholes.
Tom T.
"Michael S" wrote:
I just love C! But C would be useless without the pre-processor...
#define begin { #define end } #define WriteLn printf #define procedure void
procedure SayHello() begin WriteLn("Hello World!"); end
Have a great day!
- Michael S
Well,
That's C++ isn't it: anything is possible, from extremely simple to
extremely complex.
But, a regular C++ user is shielded from its complexity, if he just uses
such things. That's what the STL is for: shielding complexity. At least, that
is the intention (some people argue about that).
Anyway, I just hope that the next C++ standard makes things more transparant.
Greetz,
Tom T.
"Sean Hederman" wrote: And they wonder why every time I read C++ I get nosebleeds...
"TT (Tom Tempelaere)" <_|\|_0$P@|/\|titi____AThotmailD.Tcom|/\|@P$0_|\|_> wrote in message news:31**********************************@microsof t.com... Gentlemen,
If you want top-notch Macro coding, check this out:
http://www.artima.com/cppsource/foreach.html
A foreach operator for c++ languages, written with macro's, template magic and language loopholes.
Tom T.
"Michael S" wrote:
I just love C! But C would be useless without the pre-processor...
#define begin { #define end } #define WriteLn printf #define procedure void
procedure SayHello() begin WriteLn("Hello World!"); end
Have a great day!
- Michael S
I love C, too. More the kind of love that comes with 15 years of
cohabitation.
However, I would never use the preprocessor that way. Yuck!
"TT (Tom Tempelaere)" <_|\|_0$P@|/\|titi____AThotmailD.Tcom|/\|@P$0_|\|_>
wrote in message news:59**********************************@microsof t.com... Well,
That's C++ isn't it: anything is possible, from extremely simple to extremely complex.
I know, part of the reason I have a see-sawing love/hate relationship with
the language. Right now I'm in "amused cynicism" mode ;D
But, a regular C++ user is shielded from its complexity, if he just uses such things. That's what the STL is for: shielding complexity. At least, that is the intention (some people argue about that).
The STL is a major source of those nosebleeds I mentioned...
I love the STL in theory, and despise it in practise. Try to do anything
vaguely unusual and you either have template parameter arguments approaching
essay length, or vast amounts of typedefs cluttering up the namespace.
Anyway, I just hope that the next C++ standard makes things more transparant.
Greetz, Tom T.
"Sean Hederman" wrote:
And they wonder why every time I read C++ I get nosebleeds...
"TT (Tom Tempelaere)" <_|\|_0$P@|/\|titi____AThotmailD.Tcom|/\|@P$0_|\|_> wrote in message news:31**********************************@microsof t.com... > Gentlemen, > > If you want top-notch Macro coding, check this out: > > http://www.artima.com/cppsource/foreach.html > > A foreach operator for c++ languages, written with macro's, template > magic > and language loopholes. > > Tom T. > > "Michael S" wrote: > >> I just love C! But C would be useless without the pre-processor... >> >> #define begin { >> #define end } >> #define WriteLn printf >> #define procedure void >> >> procedure SayHello() >> begin >> WriteLn("Hello World!"); >> end >> >> Have a great day! >> >> - Michael S >> >> >> >> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jim Hubbard |
last post by:
It seems that Microsoft not only does not need the classic Visual Basic
developer army (the largest army of developers the world has ever seen), but
now they don't need ANY Windows developer at a...
|
by: Doug Laidlaw |
last post by:
what is the source of the Latin or pseudo-Latin gobbledegook that is often
used to give sample pages, tables etc. some content. It seems to be a set
piece, not just random words.
Doug.
--...
|
by: jm |
last post by:
I am trying to use datepart to get the real name of the month like
"April" or "APR" not just "4." I could not find it in the
documentation. Sorry. Thank you.
|
by: Sasha |
last post by:
Hi everyone,
Here is my problem:
I have the following classes:
- DataNode - this class is designed to hold some data and will be contained
in a tree like data structure DataTree. When...
|
by: John Rivers |
last post by:
http://www.15seconds.com/Issue/030812.htm?voteresult=1
poor guy worked his heart out, just to make a page control
and then they published it
ha ha ha ha ha
to "help" others
| |
by: Scott Abel |
last post by:
Tuesday, December 12, 2006 -- 10:00AM EST / 3:00 PM GMT
X-Pubs presents: CMS & Change - Love it, Hate it, Master it (Scott Abel
& Emma Hamer)
Reserve your Webinar seat now at:...
|
by: HangEveryRepubliKKKan |
last post by:
Ahahahaha.. Lets see if I get this Demented Lintard reasoning right.
Vista is a failure becuase after 300 days after it's release, it only has
7.5% of the OS market while the Lintard OS, is a...
|
by: oliharvey |
last post by:
I'm an experienced web developer - but haven't used master pages much.
I find that I'm not really comfortable with them - so perhaps I'm
missing something.....
When I first read about them I...
|
by: lorlarz |
last post by:
Contrary to what one authority in the JavaScript field says:
JavaScript does make errors when dealing with just with integers.
This authority (Douglas Crockford.) says:
"integer arithmetic in...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |