Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-16-2012, 04:51 AM   #1
Shahid nx
Registered: Jan 2012
Posts: 46

Rep: Reputation: Disabled
error: "." may not appear in macro parameter list?

I have define macro like this
TSMP_PRINT_TRANSID (provDet.transId);\
TSMP_PRINT_NODEID (provDet.reqMsg.nodeid);\
TSMP_PRINT_SRVID (provDet.srvId);\
TSMP_PRINT_PKGID (provDet.srvId);\
TSMP_PRINT_COSID (provDet.subsInfo.cosId);
It is showing
error: "." may not appear in macro parameter list.

Please help me out urgent
Old 11-16-2012, 06:07 AM   #2
Senior Member
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,533

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
What is it that you are trying to do? If I had to guess, it appears that you are attempting to declare a macro that can be used to print values of a complex structure.

Would it not be better to merely declare a function that handles the effort of printing the data you require (in the format you require) and have your main macro defined to be a call to that function?
Old 11-16-2012, 10:56 AM   #3
Senior Member
Registered: Nov 2005
Distribution: Debian
Posts: 2,815

Rep: Reputation: 999Reputation: 999Reputation: 999Reputation: 999Reputation: 999Reputation: 999Reputation: 999Reputation: 999
You need a space between the first backslash and the macro name, otherwise you are defining a macro called TSMP_PROV_VAL_PRINT_DFT_IN_PARAMSTSMP_PRINT_MSISDN with provDet.subsInfo.msisdn as a parameter.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
getting "parameter has incomplete type" and "conflicting types" error yogi.aash Linux - Newbie 2 05-31-2010 07:25 PM
postgresql-8.4.2 error: unrecognized configuration parameter "max_fsm_pages" Kropotkin Linux - Server 2 12-29-2009 12:22 PM
[SOLVED] How can I fix "Error: BadWindow (invalid window parameter)" ShellyCat Linux - Desktop 1 08-17-2007 10:42 AM
standard grep question. "The parameter list is too long" antis Linux - General 1 07-03-2007 02:43 AM
IPW2200 Make error macro "create_workqueue" passed 2 arguments, but takes just 1 jplev22 Linux - Wireless Networking 2 09-16-2005 12:34 PM

All times are GMT -5. The time now is 08:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration