Opened 13 years ago

Closed 13 years ago

#333 closed bug (fixed)

Use of variable starting with an underscore followed by a capital letter.

Reported by: david.kirkby@… Owned by: Oleksandr
Priority: minor Milestone: 3-1-4 and higher
Component: dontKnow Version: 3-1-3
Keywords: Cc:

Description

There are various bits of the Singular source code which have variables which start with an underscore and are then followed by a capital letter. A small selection are:

mpr_base.cc:  Qi= _Qi;
p_polys.cc:static int* _Components = NULL;
p_polys.cc:static long* _ShiftedComponents = NULL;
p_polys.cc:static int _ExternalComponents = 0;
p_polys.cc:          int* Components = (_ExternalComponents ? _Components :
p_polys.cc:          long* ShiftedComponents = (_ExternalComponents ? _ShiftedComponents:
p_polys.cc:  _Components = Components;
p_polys.cc:  _ShiftedComponents = ShiftedComponents;
p_polys.cc:  _ExternalComponents = 1;
p_polys.cc:  _ExternalComponents = 0;

I believe you will find they are reserved in C++. I don't have a copy of the standard myself, so can't provide a definitive reference, but see for example the following, where I have removed the obvious characters to avoid your anti-spam measures, which seem to be rejecting a lot of quite legitimate attempts I've made to post questions here.

stackoverflow.com/questions/228783/what-are-the-rules-about-using-an-underscore-in-a-c-identifier

en.wikipedia.org/wiki/Name_mangling

I would suggest you rename these variables to something else.

Dave

Change History (2)

comment:1 Changed 13 years ago by seelisch

Owner: changed from somebody to Oleksandr

comment:2 Changed 13 years ago by Oleksandr

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.