473,326 Members | 2,813 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,326 software developers and data experts.

P((int));

Hi,
I've seen this in some code, "char* blah P((int))" or "Void* stuff
P((double))"

What does this mean? I've been looking all around and can't find an answer.
Search engions are no help 'cuz they ignore, "((" and "))".

Thanks.

-0x53 0x20 0x65 0x20 0x61 0x20 0x6E
Jul 22 '05 #1
2 1309
"Sean M. Tucker" <se***********@yahoo.com> wrote in message
news:k1*******************@news4.srv.hcvlny.cv.net ...
Hi,
I've seen this in some code, "char* blah P((int))" or "Void* stuff
P((double))"

What does this mean?
I'll assume that where you wrote 'blah', and 'stuff',
the actual code has something else. Why not post *exactly*
what you saw? And what it means could easily depend
upon context.

I've been looking all around and can't find an
answer.


I'm not surprised. Your question is very vague.

-Mike
Jul 22 '05 #2
Sean M. Tucker wrote in
news:k1*******************@news4.srv.hcvlny.cv.net in comp.lang.c++:
Hi,
I've seen this in some code, "char* blah P((int))" or "Void* stuff
P((double))"

What does this mean? I've been looking all around and can't find an
answer. Search engions are no help 'cuz they ignore, "((" and "))".

P( X ) is a macro (#define) that either expands to X (ANSI/ISO mode) or
to () (K & R mode), it allows code to be compiled with a pre-standard
C (not C++ (*)) compiler or with a Standard C or C++ compiler.

*) C++ has never allowed prototypes without the paramiter list.

eg:

char *blah P((int));

With a pre-standard C compiler this will be expanded too:

char *blah ();

With a modern Standard conforming compiler this will be:

char *blah( int );

Whenever you see UPERCASENAME(( something )) there is a fair chance
that some kind of macro trickery is going on.

The double parens' are needed so that (possibly empty) comma
seperated list's can be passed to the macro.

void f P((int, char)); /* void f( int, char ); */

Rob.
--
http://www.victim-prime.dsl.pipex.com/
Jul 22 '05 #3

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

Similar topics

34
by: E. Robert Tisdale | last post by:
Please find attached the physical constants header file physical.h It defines conversion factors to mks units. It might be used like this: > cat main.cc #include<iostream>...
15
by: Dave | last post by:
Hello NG, It is well known that memory-allocating definitions should not be put in a header file. I believe, however, that this does not apply to const definitions. For example: #ifndef...
8
by: lasek | last post by:
Hi...i'm writing from Rome...and i don't know english very well so... Only simple question, which is the difference between those two parts of code. int *pInt=NULL; int iVar=10; pInt=&iVar;
58
by: lasek | last post by:
Hi all..i'm here another time..for a simple question: #include <stdlib.h> #include <stdio.h> int main(void) { /* ** I know that someone else use different malloc ** instruction
9
by: | last post by:
void show( char *s, ...) is a function seemd like prinf code -------------- #include <stdio.h> #include <stdarg.h> void show( char *s, ...) { va_list stage;
7
by: Michael Cornelison | last post by:
I believe I have found a serious performance problem with heap management in C++ .Net. I have an application does the following thousands of times: vint = new int; vchar = new char; The...
0
by: Alpha | last post by:
How can I pint in Landscape when I use graphics.drawstring? Currently, I have to change my printer to Landscape to make it do so. The output is preview in a Crystal Report form that is setup as...
0
by: MSDN | last post by:
Hi, I have a folder with many different document types ( .doc, .xls, .pdf, .jpg, ..etc ) how do I print them all? I need to do this loop print next document endloop
8
by: miaohua1982 | last post by:
the code is as follows: #include<iostream> using namespace std; class A { public: int a; int b;
4
by: eqq2002 | last post by:
The below is my code and my compiler is vc++: #include <iostream> using namespace std; int main(){ int *pint = new int(1024); cout << "The initialized value of *pint is " <<...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.