Re: trivial syntax question...

New Message Reply Date view Thread view Subject view Author view

Jean-Luc Dery (dery++at++Discreet.COM)
Thu, 15 May 1997 11:03:15 -0400


On May 15, 5:36pm, Charlie H. Chang wrote:
> Subject: trivial syntax question...
> Hi,
> In Performer code, sometimes I will see code segment like:
>
> (channel, data);
> pfCull();
>
> or simply:
>
> (data);
>
> Where "data" is type - void, and "channel" is type - pfChannel.
> What do they mean, and what do they do?
> Thank you in advance!

Those line are used to avoid compilation warnings when a function argument is
not used.

Lets say you have

void MyChannel::cull( pfChannel* chan, void* data )
{
pfCull();
}

Warnings will be send because chan and data are not used.

There are two ways, I know of, to avoid this; the one you describe or just
defining the function as follows:

void MyChannel::cull( pfChannel*, void* )
{
pfCull();
}

Hope this answers your question,

Jean-Luc

-- 
_____________________________________________________________________________

Jean-Luc Dery Discreet Logic System Engineer 5505 boul. St-Laurent, bureau 5200 3-D Graphics Technology Montreal (Quebec), Canada, H2T 1S6 Tel: (514) 272-0525 #394 Email: dery++at++discreet.com Fax: (514) 272-0585 _____________________________________________________________________________ ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:14 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.