f



Get rid of unused parameter warning?

I have an abstract base class which defines an interface to a function which takes 3 arguments.  
From that ABC I define a set of derived classes which implements the base class' interface.  The 
thing is, some derived classes don't use some of the parameters, which causes the compiler to throw 
warnings.  As I'm not using those parameters intentionally, those warnings tend to be a bit 
annoying.

So, does anyone happen to know a good standard way to get the compiler to stop warning about those 
specific instances where a parameter isn't used? 


Thanks in advance,
Rui Maciel
0
Rui
9/25/2010 12:08:52 PM
comp.lang.c++ 49423 articles. 6 followers. Post Follow

16 Replies
1743 Views

Similar Articles

[PageSpeed] 56

On Sep 25, 3:08=A0pm, Rui Maciel <rui.mac...@gmail.com> wrote:
> I have an abstract base class which defines an interface to a function wh=
ich takes 3 arguments. =A0
> From that ABC I define a set of derived classes which implements the base=
 class' interface. =A0The
> thing is, some derived classes don't use some of the parameters, which ca=
uses the compiler to throw
> warnings. =A0As I'm not using those parameters intentionally, those warni=
ngs tend to be a bit
> annoying.
>
> So, does anyone happen to know a good standard way to get the compiler to=
 stop warning about those
> specific instances where a parameter isn't used?

One way is not to name the parameters, give only type:

 int foo( int )
 {
   return 0;
 }

For me it is fine. The downside that some claim it not documenting the
intention well enough. They may use some macro or template that does
not generate instructions:

 template<typename T>
 inline void UnusedParameter( T const& )
 {
 }

 #define UNUSED_PARAMETER(X) sizeof(X)

 int foo( int a, int b )
 {
     UNUSED_PARAMETER(a);
     UnusedParameter(b);
     return 0;
 }

That perhaps documents everything well enough.
0
ISO
9/25/2010 12:35:47 PM
* Rui Maciel, on 25.09.2010 14:08:
> I have an abstract base class which defines an interface to a function
> which takes 3 arguments. From that ABC I define a set of derived classes
> which implements the base class' interface.  The thing is, some derived
> classes don't use some of the parameters, which causes the compiler to
> throw warnings.  As I'm not using those parameters intentionally, those
> warnings tend to be a bit annoying.
>
> So, does anyone happen to know a good standard way to get the compiler to
> stop warning about those specific instances where a parameter isn't used?

In addition to ��'s answer else-thread you might consider this an opportunity 
for redesign. For example, perhaps a parameter that is unused in one 
implementation but used in another, is really a piece of knowledge that should 
reside with the object that hosts the function implementation that uses the 
parameter? Or perhaps there should be two different functions, not just one?

Cheers,

- Alf

-- 
blog at <url: http://alfps.wordpress.com>
0
Alf
9/25/2010 1:21:39 PM
Öö Tiib wrote:

> One way is not to name the parameters, give only type:
> 
> int foo( int )
> {
> return 0;
> }
> 
> For me it is fine.
<snip/>

Thanks for the help, Öö. That does the trick quite nicely, at least on g++.  Is this trick 
guaranteed to work on all platforms or is it one of those things specific to GCC?


Once again thanks for the help.  Kudos!
Rui Maciel
0
Rui
9/25/2010 1:28:00 PM
Alf P. Steinbach /Usenet wrote:

> In addition to Öö's answer else-thread you might consider this an
> opportunity for redesign. For example, perhaps a parameter that is unused
> in one implementation but used in another, is really a piece of knowledge
> that should reside with the object that hosts the function implementation
> that uses the parameter? Or perhaps there should be two different
> functions, not just one?

I see what you mean and you do have a point.  Nonetheless, in this case I believe that this design 
works well.  The abstract base class is used to specify, among other things, the interfaces to a 
specific family of interpolation functions in 3D space and their partial derivatives.  The 
interpolation functions are defined in the subsequent derived classes.  As some functions happen to 
be linear polynomials, that means that deriving them results in eliminating a parameter from the 
expression, which causes the compiler to warn about unused parameters. 


Rui Maciel
0
Rui
9/25/2010 1:40:28 PM
Rui Maciel wrote:

> �� Tiib wrote:
> 
>> One way is not to name the parameters, give only type:
>> 
>> int foo( int )
>> {
>> return 0;
>> }
>> 
>> For me it is fine.
> <snip/>
> 
> Thanks for the help, ��. That does the trick quite nicely, at least on
> g++.  Is this trick guaranteed to work on all platforms or is it one of
> those things specific to GCC?

As with all warnings, they are compiler specific. There is nothing in the 
standard that requires the warnings in the first place, and there is also no 
language that prevents a compiler from issuing gratuitous warnings of any 
kind. 

That said, what would be a good wording for this warning in case of an 
unnamed parameter? Something like:

  unnamed parameter not used (not that you
  could use it, but I just felt like telling you)


Best

Kai-Uwe Bux
0
Kai
9/25/2010 2:01:43 PM
�� Tiib wrote:

> On Sep 25, 3:08 pm, Rui Maciel <rui.mac...@gmail.com> wrote:
>> I have an abstract base class which defines an interface to a function
>> which takes 3 arguments. From that ABC I define a set of derived classes
>> which implements the base class' interface.  The thing is, some derived
>> classes don't use some of the parameters, which causes the compiler to
>> throw warnings.  As I'm not using those parameters intentionally, those
>> warnings tend to be a bit annoying.
>>
>> So, does anyone happen to know a good standard way to get the compiler to
>> stop warning about those specific instances where a parameter isn't used?
> 
> One way is not to name the parameters, give only type:
> 
>  int foo( int )
>  {
>    return 0;
>  }
> 
> For me it is fine. 

For me too.

> The downside that some claim it not documenting the
> intention well enough. They may use some macro or template that does
> not generate instructions:
> 
>  template<typename T>
>  inline void UnusedParameter( T const& )
>  {
>  }
> 
>  #define UNUSED_PARAMETER(X) sizeof(X)
> 
>  int foo( int a, int b )
>  {
>      UNUSED_PARAMETER(a);
>      UnusedParameter(b);
>      return 0;
>  }
> 
> That perhaps documents everything well enough.

I think, this is worse. By giving names to the parameters, you actually make 
it possible in the first place to use them. Those macros amount to nothing 
more than comments and, given enough time, they _will_ turn false. The 
compiler has no change anymore of catching things like:

  int foo ( int a, int b )
  {
    UNUSED_PARAMETER(a);
    return ( a*b );
  }


Best

Kai-Uwe Bux
0
Kai
9/25/2010 2:07:57 PM
On Sep 25, 4:28=A0pm, Rui Maciel <rui.mac...@gmail.com> wrote:
> =D6=F6 Tiib wrote:
> > One way is not to name the parameters, give only type:
>
> > int foo( int )
> > {
> > return 0;
> > }
>
> > For me it is fine.
>
> <snip/>
>
> Thanks for the help, =D6=F6. That does the trick quite nicely, at least o=
n g++. =A0Is this trick
> guaranteed to work on all platforms or is it one of those things specific=
 to GCC?

I don't know a C++ compiler that does not compile it.
0
ISO
9/25/2010 2:58:56 PM
Rui Maciel ha scritto:

> So, does anyone happen to know a good standard way to get the compiler to stop warning about those 
> specific instances where a parameter isn't used? 

What's wrong with disabling the warning using appropriate compiler flags 
for those compilation units in which the warning annoys you?


-- 
Christian Hackl
hacki@sbox.tugraz.at

Milano 2008/2009 -- L'Italia chiam�, s�!
0
Christian
9/25/2010 3:16:10 PM
On 2010-09-25 10:58:56 -0400, �� Tiib said:

> On Sep 25, 4:28�pm, Rui Maciel <rui.mac...@gmail.com> wrote:
>> �� Tiib wrote:
>>> One way is not to name the parameters, give only type:
>> 
>>> int foo( int )
>>> {
>>> return 0;
>>> }
>> 
>>> For me it is fine.
>> 
>> <snip/>
>> 
>> Thanks for the help, ��. That does the trick quite nicely, at least on 
>> g++. �Is this trick
>> guaranteed to work on all platforms or is it one of those things 
>> specific to GCC?
> 
> I don't know a C++ compiler that does not compile it.

Well, yes, it's guaranteed to work on all platforms in the sense that 
it's valid C++, so conforming compilers must accept it. But the 
question was whether it will suppress that warning on all platforms, 
and that, as others have said, is not required.

-- 
  Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The 
Standard C++ Library Extensions: a Tutorial and Reference 
(www.petebecker.com/tr1book)

0
Pete
9/25/2010 3:17:23 PM
Christian Hackl wrote:

> What's wrong with disabling the warning using appropriate compiler flags
> for those compilation units in which the warning annoys you?

I only want to eliminate that particular type of warning when it refers to the set of functions 
which I intentionally wrote so that they don't use a given parameter.


Rui Maciel
0
Rui
9/25/2010 5:12:37 PM
�� Tiib <ootiib@hot.ee> wrote:
>> Thanks for the help, ��. That does the trick quite nicely, at least on g++. �Is this trick
>> guaranteed to work on all platforms or is it one of those things specific to GCC?
> 
> I don't know a C++ compiler that does not compile it.

  I think that's the wrong answer to the question. The correct answer is:
"Well, the C++ standard defines that syntax. If a compiler wouldn't support
it, throw it away because it's broken."
0
Juha
9/26/2010 7:11:33 AM
On 26 sept, 10:11, Juha Nieminen <nos...@thanks.invalid> wrote:
> =D6=F6 Tiib <oot...@hot.ee> wrote:
> >> Thanks for the help, =D6=F6. That does the trick quite nicely, at leas=
t on g++. =A0Is this trick
> >> guaranteed to work on all platforms or is it one of those things speci=
fic to GCC?
>
> > I don't know a C++ compiler that does not compile it.
>
> =A0 I think that's the wrong answer to the question. The correct answer i=
s:
> "Well, the C++ standard defines that syntax. If a compiler wouldn't suppo=
rt
> it, throw it away because it's broken."

Maybe your answer is better, but it does not say what i wanted to
tell.  I wanted only to say that

 int foo( int )
 {
     return 0;
 }

compiles well and without warnings on all C++ compilers that i know of
and so that is not g++ specific. Not everything may be anonymous by
standard. Code like:

typedef struct {int x; int y} Point;

It is ill-formed (but does still compile on several compilers).
0
ISO
9/26/2010 3:24:07 PM
�� Tiib <ootiib@hot.ee> wrote:
> typedef struct {int x; int y} Point;
> 
> It is ill-formed (but does still compile on several compilers).

  Hmm, why is it ill-formed? (Or are you talking about the missing
semi-colon?)
0
Juha
9/26/2010 6:43:03 PM
On 9/25/2010 1:12 PM, Rui Maciel wrote:
> Christian Hackl wrote:
>
>> What's wrong with disabling the warning using appropriate compiler flags
>> for those compilation units in which the warning annoys you?
>
> I only want to eliminate that particular type of warning when it refers to the set of functions
> which I intentionally wrote so that they don't use a given parameter.

Why do you give the function a parameter when you know that you're not 
going to use it?  Just curious.

V
-- 
I do not respond to top-posted replies, please don't ask
0
Victor
9/27/2010 1:55:33 PM
Victor Bazarov wrote:

> Why do you give the function a parameter when you know that you're not
> going to use it?  Just curious.

In this case we are dealing with an abstract base class which defines a specific interface.  Then, 
when implementing this interface, some implementations may not use every parameter which was defined 
in the interface.  In my case, I was dealing with an interface to a set of interpolation functions, 
along with a set of partial derivatives.  As some interpolation functions happen to be linear 
polynomials, their derived functions will not contain some parameters, hence the need to get rid of 
those warnings.


Rui Maciel
0
Rui
9/27/2010 2:49:42 PM
On Sep 25, 5:08=A0pm, Rui Maciel <rui.mac...@gmail.com> wrote:
> I have an abstract base class which defines an interface to a function wh=
ich takes 3 arguments. =A0
> From that ABC I define a set of derived classes which implements the base=
 class' interface. =A0The
> thing is, some derived classes don't use some of the parameters, which ca=
uses the compiler to throw
> warnings. =A0As I'm not using those parameters intentionally, those warni=
ngs tend to be a bit
> annoying.
>
> So, does anyone happen to know a good standard way to get the compiler to=
 stop warning about those
> specific instances where a parameter isn't used?
>
> Thanks in advance,
> Rui Maciel

Thank you so much for sharing information.
0
debra
10/1/2010 8:34:36 AM
Reply:

Similar Artilces:

How do I get rid of this warning?
Patterned after the solution suggested in the perlmodlib man page, I wrote the following code: ==================== This is file b.pm #!/usr/local/bin/perl -w use strict; package b; sub f { print "BBBBBBBB @_\n"; } eval join('', <main::DATA>) || die $@ unless caller(); 1 __END__ package main; b::f(@ARGV); ================================= When called this from the command line, say: b.pm X it works fine. But when I use it as a module, say from this context: ===================== This is file p.pl #!/usr/local/bin/perl -w use strict; use b; b::f('X'); ====...

Getting rid of warnings
I am trying to get rid of a few annoying warnings in my project - I have got rid of most of them but a few remain which I cant seem to get rid of. The first one is while using FD_SET/FD_CLR for adding and clearing sockets. I get the warning: warning C4127: conditional expression is constant The other one is using SetWindowLongPtr. I did have two warnings for this but managed to cast the result to get rid of one warning. I cant get rid of the last warning though. My code is: mOldWndProc = (WNDPROC)(long long)SetWindowLongPtr(mHwnd, GWLP_WNDPROC, (LONG_PTR)SkinWndProc); ...

How to get rid of obsolete function warning
Hi all, Since I'm using randint function I receive: Warning: This is an obsolete function and may be removed in the future. Please use RANDI instead. To disable this warning, type warning('off','comm:obsolete:randint'); but everytime I startup MATLAB I have to do "warning('off','comm:obsolete:randint');" How can I get rid of that warning permanently? Elnaz "Elnaz " <ebsadeghian@gmail.com> wrote in message <kjvlb2$6op$1@newscl01ah.mathworks.com>... > Hi all, > Since I'm using randint function I receive: > Warning: This is an obsolete function and may be removed in the > future. > Please use RANDI instead. > To disable this warning, type > warning('off','comm:obsolete:randint'); > but everytime I startup MATLAB I have to do "warning('off','comm:obsolete:randint');" > How can I get rid of that warning permanently? > > Elnaz Why not just switch to randi? It won't be long before randint does disappear, and then you will need to do so anyway. John On 4/8/2013 6:54 PM, Elnaz wrote: > Hi all, > Since I'm using randint function I receive: > Warning: This is an obsolete function and may be removed in the > future. > Please use RANDI instead. > To disable this warning, type > warning('off','comm:obsolete:r...

How do you get rid of dynamic linker warning
I have just ported a large application suite to sco 5.0.7. The application suite runs fine. It's passed our many regression test. The only annoyance is when we run a program, we get the "warning": dynamic linker: prog123: warning: copy relocation size mismatch for symbol Xpcs_work_int How do you stop the dynamic linker telling me this every time I run a program? Surely there is an environment variable to tell it "I'm not interested, I know there is a coding problem, I don't want to fix it, stop telling me this." I'm using the same code on AIX, HPUX, Linu...

incompatible warning in C/C++
incompatible warning in C/C++ I am using MS Visual C/C++ 6.0. I get the following warning when compiling C:model.ex.c(1221) : warning C4133: '=' : incompatible types - from 'struct s_lsp_def *' to 'struct s_lsp_def *' In the .h file, I have ====================== typedef struct s_lsp_def; typedef struct { int lsp_id; int priority; struct s_lsp_def* ptr_next_lsp_def; }s_lsp_def; in a .c file, model.ex.c, I have ================================ int bcModel_add_lspToList ( s_lsp_def* the_ptr_lsp_def, { s_lsp_def* curr_ptr_lsp_def; // the follow...

Can I get rid of C libraries dependencies?
Okey, so I wrote this code: pragma No_Run_Time; with Interfaces.C.Strings; use Interfaces.C.Strings; with Interfaces.C; use Interfaces.C; procedure Main is procedure cputs(str:Char_Array); pragma Import(C, cputs, "puts"); procedure cexit(code:Integer); pragma Import(C, cexit, "exit"); begin cputs("Hello World!"); cexit(0); end Main; What I want to achive is a tiny 2kb binary executable with a single function called as entry point (which is defined in Ada and called Main procedure). The pragma on top let me get ...

XPATH
Hello, I have an Xpath expression: //foo[translate(text(),"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")="'bla'"] Here i check if i can find bla in a foo tag - and its case insensitive. If i use this expression I get warnings (failures?): Unrecognized escape \Q passed through at (eval 4) line 1. Unrecognized escape \E passed through at (eval 4) line 1. Unrecognized escape \Q passed through at (eval 4) line 1. Unrecognized escape \E passed through at (eval 4) line 1. and I dont know what they mean? if i check without the case sensitive tes...

How to get rid of warning message from proc dataset
Hey, guys, I submitted the followin codes, and get warning message as "Warning: No matching members in directory". I cheked some papers, SAS gave such message when library is not specified. But in my case, the library is defined. And the warning still exists the second time I run the code. Does any one know how to get rid of the warning? (note: try is a sas dataset) . Many thanks. libname temp 'C:\Documents and Settings\Desktop\test'; libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; proc datasets; copy in=temp out=t2path; select try; quit; Mindy ...

How to get rid of warning message from proc dataset #2
Hey, guys, I submitted the followin codes, and get warning message as "Warning: No matching members in directory". I cheked some papers, SAS gave such message when library is not specified. But in my case, the library is defined. And the warning still exists the second time I run the code. Does any one know how to get rid of the warning? (note: try is a sas dataset) . Many thanks. libname temp 'C:\Documents and Settings\Desktop\test'; libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; proc datasets; copy in=temp out=t2path; select try; quit; Mindy ...

Re: How to get rid of warning message from proc dataset
Mindy, Do you still get the warning if you use double quotes {") rather than single quotes (') in the libname statements? Art ------ On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_sas@YAHOO.COM> wrote: >Hey, guys, > >I submitted the followin codes, and get warning message as "Warning: >No matching members in directory". I cheked some papers, SAS gave such >message when library is not specified. But in my case, the library is >defined. >And the warning still exists the second time I run the code. Does any >one know how to get rid of the warning? (note: try is a sas dataset) . >Many thanks. > >libname temp 'C:\Documents and Settings\Desktop\test'; >libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; > >proc datasets; > copy in=temp out=t2path; > select try; >quit; >Mindy On Oct 1, 11:32 am, art...@NETSCAPE.NET (Arthur Tabachneck) wrote: > Mindy, > > Do you still get the warning if you use double quotes {") rather than > single quotes (') in the libname statements? > > Art > ------ > > > > On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_...@YAHOO.COM> wrote: > >Hey, guys, > > >I submitted the followin codes, and get warning message as "Warning: > >No matching members in directory". I cheked some papers, SAS gave such > >message when library is not specified. But in my case, ...

How can I get rid of #define in my generated C code ...?
Folk, I am using lex and yacc for a project I am working on, wondering if there is any switch I can specify ANYWHERE, including the C compiler, that would take the .c files that these utilities generate, and get rid of all the #defines in the generated code. (when I say get rid of, I don't mean to simply delete, I mean to recognize: Oh yes, this is defined and here is what I want to do.) The y.tab.c and lex.yy.c files that these utilities produce are infested with #define, a lot conditional, making them impossible to read, and modify (e.g. yes, I need to make some changes to them) Any s...

Re: How to get rid of warning message from proc dataset #4
Coding NOLIST also works. 52 proc datasets nolist; 53 copy in=temp out=t2path; 54 select try; 55 quit; NOTE: Copying TEMP.TRY to T2PATH.TRY (memtype=DATA). NOTE: There were 1 observations read from the data set TEMP.TRY. NOTE: The data set T2PATH.TRY has 1 observations and 0 variables. NOTE: PROCEDURE DATASETS used (Total process time): real time 0.01 seconds cpu time 0.00 seconds I think RROC DATASET is try applying the SELECT to the list of library members it prints by default. With no LIBRARY= option it defaults to WORK, but TRY does not exist. I had to see your example to understand the question. On 10/2/07, Howard Schreier <hs AT dc-sug DOT org> <nospam@howles.com> wrote: > On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_sas@YAHOO.COM> wrote: > > >Hey, guys, > > > >I submitted the followin codes, and get warning message as "Warning: > >No matching members in directory". I cheked some papers, SAS gave such > >message when library is not specified. But in my case, the library is > >defined. > >And the warning still exists the second time I run the code. Does any > >one know how to get rid of the warning? (note: try is a sas dataset) . > >Many thanks. > > > >libname temp 'C:\Documents and Settings\Desktop\test'; > >libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; > > > &g...

Re: How to get rid of warning message from proc dataset #3
On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_sas@YAHOO.COM> wrote: >Hey, guys, > >I submitted the followin codes, and get warning message as "Warning: >No matching members in directory". I cheked some papers, SAS gave such >message when library is not specified. But in my case, the library is >defined. >And the warning still exists the second time I run the code. Does any >one know how to get rid of the warning? (note: try is a sas dataset) . >Many thanks. > >libname temp 'C:\Documents and Settings\Desktop\test'; >libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; > >proc datasets; > copy in=temp out=t2path; > select try; >quit; >Mindy Try removing IN=TEMP from the COPY statement and instead code LIBRARY=TEMP in the PROC statement. It actually seems to work either way, but using 9.1.3 I do see that spurious warning. libname temp 'c:\temp\a'; libname t2path 'c:\temp\aa'; data temp.try; run; proc datasets; copy in=temp out=t2path; select try; quit; proc datasets library=temp; copy out=t2path; select try; quit; ...

Re: How to get rid of warning message from proc dataset #2
Mindy, Your code works, on my system, as originally written. Thus, two more questions: (1) does try exist in libname temp? and (2) is try a SAS dataset of the same version as the version of SAS you a running? Art ------- On Mon, 1 Oct 2007 20:43:44 -0000, Mindy <master2005_sas@YAHOO.COM> wrote: >On Oct 1, 11:32 am, art...@NETSCAPE.NET (Arthur Tabachneck) wrote: >> Mindy, >> >> Do you still get the warning if you use double quotes {") rather than >> single quotes (') in the libname statements? >> >> Art >> ------ >> >> >> >> On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_...@YAHOO.COM> wrote: >> >Hey, guys, >> >> >I submitted the followin codes, and get warning message as "Warning: >> >No matching members in directory". I cheked some papers, SAS gave such >> >message when library is not specified. But in my case, the library is >> >defined. >> >And the warning still exists the second time I run the code. Does any >> >one know how to get rid of the warning? (note: try is a sas dataset) . >> >Many thanks. >> >> >libname temp 'C:\Documents and Settings\Desktop\test'; >> >libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; >> >> >proc datasets; >> > copy in=temp out=t2path; >> > select try; >> >quit; &g...

[fourier] getting rid of irritating font-encoding-changes warnings
When using the `fourier' package, one gets the warnings (harmless, they tell me) about font-encoding changes following at the end of my post. How can I get LaTeX not to mention them anymore? They take up valuable screen real-estate in the "Log & Messages"-window of my editor (Kile). TIA, Erik The warnings I spoke of: /usr/share/texmf/tex/latex/fourier/fourier.sty:50: Encoding `OT1' has changed to `T1' for symbol font(Font) `operators' in the math version `normal' on input line 50. Encoding `OT1' has changed to `T1' for symbol font(Font) `operators' in the math version `normal' /usr/share/texmf/tex/latex/fourier/fourier.sty:50: Encoding `OT1' has changed to `T1' for symbol font(Font) `operators' in the math version `bold' on input line 50. Encoding `OT1' has changed to `T1' for symbol font(Font) `operators' in the math version `bold' /usr/share/texmf/tex/latex/fourier/fourier.sty:59: Encoding `OML' has changed to `FML' for symbol font(Font) `letters' in the math version `normal' on input line 59. Encoding `OML' has changed to `FML' for symbol font(Font) `letters' in the math version `normal' /usr/share/texmf/tex/latex/fourier/fourier.sty:59: Encoding `OML' has changed to `FML' for symbol font(Font) `letters' in the math version `bold' on input line 59. Encoding `OML' has changed to `FML' for symbol font(Font) `letters...

Better C/C++ Than C/C++?
I am looking for a good systems programming language that can be used instead of C/C++. My qualifications for the language are: * mature compiler(s) that produce native-code binaries (for Windows) * open source - preferable, but not 100% necessary Thanks, Kevin "Kevin Albrecht" <kevin@albrecht.net> writes: > I am looking for a good systems programming language > that can be used instead of C/C++. My qualifications > for the language are: > > * mature compiler(s) that produce native-code > binaries (for Windows) Ocaml, D, cyclone, Eiffel, Beta > * open source - preferable, but not 100% necessary what's wrong with using C? Friedrich > what's wrong with using C? Too low level, no built-in garbage collection. -- Kevin "Kevin Albrecht" <kevin@albrecht.net> writes: >> what's wrong with using C? > > Too low level, Well the Smalltalk people say, have a small language and a big library. I assume C's library status beyond that of Smalltalk. > no built-in garbage collection. Use the Boehm Weisser GC. Friedrich "Kevin Albrecht" <kevin@albrecht.net> wrote in message news:<2TiYb.237892$rj7.1641209@twister.tampabay.rr.com>... > I am looking for a good systems programming language > that can be used instead of C/C++. My qualifications > for the language are: > > * mature compiler(s) that produce native-code > binaries (for Windows) > ...

empty variables
I have perl code which should do some action only if: - the variable does not begin with "#" (commented out), - the variable is not empty use strict; use warnings; my @array = ("# Comment", "/usr/bin/binary --test", ""); foreach my $var (@array) { my @execargs = split(/#/, $var); if ( $execargs[0] ne '' ) { print "$var 0: |$execargs[0]|\n" } } Unfortunately, it shows uninitialized value warnings for the empty variable (""): $ perl test.pl /usr/bin/binary --test 0: |/usr/bin/binary --test| Use of uninitia...

Acronis Thrue Image Has Created Two Temporary C-Drives. How Do I Get Rid of Them?
Acronis True Image creates new temporary drive names in order to view the images. Now, I have two extra drives, M:, N:, with the same name as my C-drive: DRIVE-C. This confuses many of my programs. How do I get rid of these extra drives (M and N) without deleting my entire C-drive? Thanks! maria Thank you, WD! I missed it in the instructions. Actually, I did what you said in Total Commander. maria On Wed, 03 Aug 2005 00:32:10 -0400, Will Dormann <wdormann@yahoo.com.invalid> wrote: >maria wrote: >> Acronis True Image creates new temporary drive names in or...

get what is not equal in a.c to b.c
How come this one works SELECT DISTINCT a.d FROM a,b WHERE a.c NOT IN (SELECT b.c FROM b) but this one doesn't SELECT DISTINCT a.d,a.c FROM a LEFT JOIN b USING (c) WHERE a.c<>b.c I'm trying to get the rows in a.c that don't match b.c but the 2nd one should be faster. thanks, Janis TABLE A TABLE B col d col c col c ____________ ____________ 1 apple apple 2 banana kiwi 3 orange banana 4 grapefruit blackberry 5 cherry persimmon 6 N...

Where to get a compatibility list of C and C++?
Hi, all! I'm looking for a list of features that are supported in C but not supported in C++. I also need the complete list of language alterations from K&R C to C89 then to C99. Would anyone help? Thanks! Aladdin On 25 Jul 2005 18:44:11 -0700, "Aladdin" <buaa_aladdin@163.com> wrote in comp.lang.c: > Hi, all! > > I'm looking for a list of features that are supported in C but not > supported in C++. I also need the complete list of language alterations > from K&R C to C89 then to C99. > > Would anyone help? Thanks! > > Aladdin ...

How to get signed zeros in C++/C?
I don't find how to express signed zeros in C++/C. Does anybody know what is the proper way to do so? Are they just -0.0 and +0.0? How to distinguish signed zeros from true zeros. http://en.wikipedia.org/wiki/Signed_zero Regard, Peng Peng Yu <pengyu.ut@gmail.com> writes: > I don't find how to express signed zeros in C++/C. Does anybody know > what is the proper way to do so? Are they just -0.0 and +0.0? How to > distinguish signed zeros from true zeros. > > http://en.wikipedia.org/wiki/Signed_zero AFAIK there is no literal for those. You need to ...

Just getting started in C++, C+
Thanks in advance to all of you, Your recommendations: What kind of instruction and software are needed to learn and do useful programming using C+, C++ ? I would like to access and use the windows graphics environment. SRabin, > What kind of instruction and software are needed to learn and do useful > programming using C+, C++ ? There is nothing like C+. A good tutorial: http://www.cplusplus.com/doc/tutorial/ > I would like to access and use the windows graphics environment. Free: DevC++ (core c++, that black command line window) + WxWidgets (for graphical user interfaces) C...

How to get rid of "hex/oct constants > sys.maxint" warning?
I'm getting tired of seeing meaningless warnings from my code, but I can't figure out how to get rid of them: For example: fcntl.ioctl(fd,0xc0047a80,s) causes FutureWarning: hex/oct constants > sys.maxint will return positive values in Python 2.4 and up Firstly, I have no idea what that error means in this context. 0xc0047a80 isn't intended to be an integer (either positive or negative): it's just a chunk of 32 bits. Googling the newsgroup came up with the suggestion that putting an "L" on the end of the constant would eliminate the warning, but it causes an error: fcntl.ioctl(fd,0xc0047a80L,s) causes OverflowError: long int too large to convert to int So, that doesn't work. How _do_ I get rid of the warning? Is there a way to tell Python that the constant isn't an integer, it's just a bit pattern? -- Grant Edwards grante Yow! Mr and Mrs PED, can at I borrow 26.7 visi.com On 11 Aug 2004, Grant Edwards wrote: > How _do_ I get rid of the warning? Is there a way to tell > Python that the constant isn't an integer, it's just a bit > pattern? The best way is to tell Python to silence the warning: >>> 0xc0047a80 FutureWarning >>> import warnings >>> warnings.simplefilter('ignore',FutureWarning) >>> 0xc0047a80 -1073448320 fcntl() do...

Thumb calling ARM asm snippet, can't get rid of the warning(+)
Hi Group, Just in case someone have dealt with such an issue already and can give me an answer off the top of his head. I'm compiling a project in Thumb mode. I've got a file myfunc.c that I also compile in Thumb. This file contains an assembly snippet written in ARM instruction set. It's not an inline asm snippet within a C function but rather a whole function in asm. It looks like this: asm("\n\ .align 2\n\ .code 32\n\ .internal MULADD\n\ MULADD: \n\ STMFD sp!,{r4-r11,lr}\n\ [snip] LDMFD sp!,{r4-r11,lr}\n\ BX lr\n\ "); // end of asm() Th...

Web resources about - Get rid of unused parameter warning? - comp.lang.c++

Parameter - Wikipedia, the free encyclopedia
A parameter (from the Ancient Greek παρά , "para", meaning "beside, subsidiary" and μέτρον , "metron", meaning "measure"), in its common meaning, ...

fb_source Parameter - Facebook-Entwickler
This document lists the complete list of values for the fb_source parameter that is returned with th...

Google Webmaster Tools Parameter Handling - Flickr - Photo Sharing!
You aren't signed in Sign In Help Home The Tour Sign Up Explore Explore Home Last 7 Days Interesting Popular Tags Calendar Most Recent Uploads ...

Cat 8: TIA performance standards committee chairman previews parameters of forthcoming twisted-pair cable ...
Category 8, the next-generation twisted-pair cabling specification, is still in development, but the outlook looks quite positive that it will ...

Philippine president asks for 'parameters' of Mayon Volcano tours
Philippine president asks for 'parameters' of Mayon Volcano tours People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, Apr, May, ...

Alternatives to boolean parameters
... ) { PrintLine ( item . Name ); if ( printDetails ) { PrintLine ( item . Description ); } } } Aha! Now can see that the boolean parameter ...

Exporting Error (Error in Parameter...: Apple Support Communities
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability ...

Apple tech monitors device aging, adjusts operating parameters to ensure optimal performance
... describing a method of monitoring the aging of a device's electronics, comparing the data with a global average and modifying operating parameters ...

Is it poor programming practice to pass parameters as objects?
... a free, community-powered network of 100+ Q&A sites . Risser asked: So, we've got a guy who likes to write methods that take Objects as parameters, ...

Parameter Short Film Competition sponsored by Grolsch
Grolsch presents Parameter The A.V. Club Short Film Competition Please Enter Your Date of Birth Ineligible entry Enter For people over the age ...

Resources last updated: 3/19/2016 7:28:12 AM