473,387 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Simple recursive preprocessor meta-program implementation...

Here is a "simple" method for using the preprocessor to generate code via.
recursion... What do you think of my experimental recursion implementation?
Can you compile it?

Any comments are welcome...

;)
http://appcore.home.comcast.net/appc...meta-recurse.c
P.S. This example supports a max-recursion depth of 5. Of course, the limit
could be hundreds of times larger; whoa, what a big file!

If you want to set a deeper recursion depth you will have to add-on to the
VZPPMETA_DEC and VZPPMETA_RECURSE macros. For instance, if you wanted to
increase the depth from 5 to 6, you would add the following macros:
#define VZPPMETA_DEC_IMPL_I6 5
#define VZPPMETA_DEC_IMPL_D6 7
#define VZPPMETA_DEC_IMPL_N6 0

#define VZPPMETA_RECURSE_IMPL_6(Index, Macro, Param1, Param2) \
Macro(Index, 5, Param1, Param2)
VZPPMETA_RECURSE_IMPL_5(VZPPMETA_INC(Index), Macro, Param1, Param2)


One more thing, I accidentally posted this message to alt.comp.lang.c;
please ignore it.
Sorry!!!!

Thank You
Jun 14 '06 #1
0 1563

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Haines Brown | last post by:
Re. <title>, my impression has been that a line break is _NOT_ allowed in the contained text. Is that true? Also, I gather a double quotation mark in the text string (and ampersand, etc.) _IS_...
44
by: Neil Cerutti | last post by:
In Rob Pike's style guide he urges the following: Simple rule: include files should never include include files. If instead they state (in comments or implicitly) what files they need...
0
by: Ming Zhu | last post by:
Hi, all, I'm new to .NET and ASP.NET. I only use .NET Framework 1.0. I'm reading the book "C# developer's guide to ASP.NET". But I find there is no place to download the code used inside this...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
1
by: Jenny | last post by:
Hi all, I wrote a simple asp.net with JScript. But it doesn't work properly. And I don't know why! The CodeBehind: Public Class WebForm1 Inherits System.Web.UI.Page ....
2
by: Lasse Edsvik | last post by:
Hello Im using VS.NET and cant get this simple page to work.......... I get: CS0122: 'dbtest.WebForm2.Button1_Click(object, System.EventArgs)' is inaccessible due to its protection level ...
0
by: RC | last post by:
Hi, I have a problem with a simple Composite Control I am trying to make. It's in fact a superclassed control. My projectname is SortedTextBox. My testapp is TestSortedTextBox. ...
26
by: jacob navia | last post by:
Summary: I have changed (as proposed by Chuck) the code to use isalpha() instead of (c>='a' && c <= 'z') etc. I agree that EBCDIC exists :-) I eliminated the goto statement, obviously it is...
31
by: Sam of California | last post by:
Is it accurate to say that "the preprocessor is just a pass in the parsing of the source file"? I responded to that comment by saying that the preprocessor is not just a pass. It processes...
4
by: Steven M. O'Neill | last post by:
I have an xml structure like this: <Meta name="fieldAttributes"> <MetaString name="name">SUB_PHONE</MetaString> <MetaString name="value">999999999</MetaString> </Meta> <Meta...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.