Hello
This is raghu. And I want to know about the meaning of the statement
given below
log_txt( __FILE__, __LINE__, ##argList);
in above statement what does FILE ,LINE ##argList mean. I want to know
about is it possiable to send arguments like that.
Thanking you in advance 6 2109
raghu wrote:
Hello
This is raghu. And I want to know about the meaning of the statement
given below
log_txt( __FILE__, __LINE__, ##argList);
in above statement what does FILE ,LINE ##argList mean. I want to know
about is it possiable to send arguments like that.
Look __FILE__, __LINE__ and ## up in K&R. It's all explained clearly there.
--
Ian Collins.
Ian Collins wrote:
raghu wrote:
Hello
This is raghu. And I want to know about the meaning of the statement
given below
log_txt( __FILE__, __LINE__, ##argList);
in above statement what does FILE ,LINE ##argList mean. I want to know
about is it possiable to send arguments like that.
Look __FILE__, __LINE__ and ## up in K&R. It's all explained clearly there.
maybe I'm talking out of my ass, but I always thought that using ', ##'
(to suppress the
comma when the last argument is void) is a GCC extension, and not K&R
or standard C.
Racaille said:
>
Ian Collins wrote:
>raghu wrote:
Hello
This is raghu. And I want to know about the meaning of the statement
given below
log_txt( __FILE__, __LINE__, ##argList);
in above statement what does FILE ,LINE ##argList mean. I want to know
about is it possiable to send arguments like that.
Look __FILE__, __LINE__ and ## up in K&R. It's all explained clearly there.
maybe I'm talking out of my ass, but I always thought that using ', ##'
(to suppress the
comma when the last argument is void) is a GCC extension, and not K&R
or standard C.
## is standard C preprocessor syntax for token-pasting. Its use outside a
macro definition (or of course a comment, string literal, etc) is simply an
error.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999 http://www.cpax.org.uk
email: rjh at the above domain, - www.
2006-11-29 <rM********************@bt.com>,
Richard Heathfield wrote:
Racaille said:
>> Ian Collins wrote:
>>raghu wrote: Hello This is raghu. And I want to know about the meaning of the statement given below log_txt( __FILE__, __LINE__, ##argList); in above statement what does FILE ,LINE ##argList mean. I want to know about is it possiable to send arguments like that.
Look __FILE__, __LINE__ and ## up in K&R. It's all explained clearly there.
maybe I'm talking out of my ass, but I always thought that using ', ##' (to suppress the comma when the last argument is void) is a GCC extension, and not K&R or standard C.
## is standard C preprocessor syntax for token-pasting. Its use outside a
macro definition (or of course a comment, string literal, etc) is simply an
error.
GCC does assign it special meaning within variadic macro definitions
where the token before it is the comma and the token after it is the
name of the variadic argument list (gcc variadic macros can have that be
somthing other than __VA_LIST__)
This is all off-topic, of course, but still better than trying to
explain it in a "standard" context when it's clearly a non-standard
usage.
Richard Heathfield wrote:
## is standard C preprocessor syntax for token-pasting. Its use outside a
macro definition (or of course a comment, string literal, etc) is simply an
error.
OK, is this usage of '##' standard c99 ?
--
#define COCO(a, ...) a, ## __VA_ARGS__
int
main(void)
{
return COCO(0);
}
--
my impression was that no, it isn't. But I may be wrong. That's why I
asked.
"Racaille" <0x********@gmail.comwrote:
>
Richard Heathfield wrote:
## is standard C preprocessor syntax for token-pasting. Its use outside a
macro definition (or of course a comment, string literal, etc) is simply an
error.
OK, is this usage of '##' standard c99 ?
#define COCO(a, ...) a, ## __VA_ARGS__
No. It's Ganuck.
Richard This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Brandon J. Van Every |
last post by:
What's better about Ruby than Python? I'm sure there's something. What is
it?
This is not a troll. I'm language shopping and I want people's answers. I
don't know beans about Ruby or have...
|
by: Sarah Tanembaum |
last post by:
Beside its an opensource and supported by community, what's the fundamental
differences between PostgreSQL and those high-price commercial database (and
some are bloated such as Oracle) from...
|
by: Steven T. Hatton |
last post by:
This is something I've been looking at because it is central to a currently
broken part of the KDevelop new application wizard. I'm not complaining
about it being broken, It's a CVS images. ...
|
by: typingcat |
last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so
on. I've tried many PHP IDEs today, but almost non of them supported
Unicode (UTF-8) file.
I've found that the only Unicode...
|
by: David Mathog |
last post by:
If this:
int i,sum;
int *array;
for(sum=0, i=0; i<len; i++){
sum += array;
}
is converted to this (never mind why for the moment):
|
by: Randy Yates |
last post by:
In Harbison and Steele's text (fourth edition, p.111)
it is stated,
The C language does not specify the range of integers that the
integral types will represent, except ot say that type int may...
|
by: Xah Lee |
last post by:
in March, i posted a essay “What is Expressiveness in a Computer
Language”, archived at:
http://xahlee.org/perl-python/what_is_expresiveness.html
I was informed then that there is a academic...
|
by: riceyeh |
last post by:
Hi,
When reading the source code of dojo, it uses the following statement
quite often. What does it mean? What I do not understand is it has a
function definition enclosed in a pair of parenthesis...
|
by: raghu |
last post by:
hello,
Iam going through a document contianing C tricks .In it they
used the statement in many places i didn't understand can u please tell
me the meaning and how the compiler compiles it and runs...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
| |