Issue 2949: Fixed(const char *) constructor problem (cxx_revision) Source: Floorboard Software (Mr. Jonathan Biggar, jon(at)floorboard.com) Nature: Uncategorized Issue Severity: Summary: The CORBA 2.3 C++ spec says (1.11): "The Fixed(char*) constructor converts a string representation of a fixed-point literal into a real fixed-point value, with the trailing 'd' or 'D' optional." However, the CORBA 2.3 spec for a fixed point literal says (3.2.5.5): "A fixed-point decimal literal consists of an integer part, a decimal point, a fraction part and a d or D. The integer and fraction parts both consist of a sequence of decimal (base 10) digits. Either the integer part or the fraction part (but not both) may be missing; the decimal point (but not the letter d (or D)) may be missing." This means that the following call is illegal: CORBA::Fixed f("-1.0"); Even though this can be rewritten (legally) as: CORBA::Fixed f(-CORBA::Fixed("1.0")); I think it would be a good idea change the definition of the constructor to also allow an optional sign (+ or -). Resolution: closed/resolved Revised Text: Change the sentence in Section 1.11 of formal/99-07-41 describing the Fixed(char *) constructor from: The Fixed(char*) constructor converts a string representation of a fixed-point literal into a real fixed-point value, with the trailing 'd' or 'D' optional. to: The Fixed(char*) constructor converts a string representation of a fixed-point literal, with an optional leading sign (+ or -) and an optional trailing 'd' or 'D', into a real fixed-point value. Actions taken: September 24, 1999: received issue June 13, 2000: closed issue Discussion: End of Annotations:===== Sender: jon@floorboard.com Message-ID: <37EBD374.FFDC1F59@floorboard.com> Date: Fri, 24 Sep 1999 12:39:32 -0700 From: Jonathan Biggar X-Mailer: Mozilla 4.6 [en] (X11; U; SunOS 5.5.1 sun4m) X-Accept-Language: en MIME-Version: 1.0 To: cxx_revision@omg.org, issues@omg.org Subject: Fixed(const char *) constructor problem Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: `m$!!\dkd9**d!!:e;!! The CORBA 2.3 C++ spec says (1.11): "The Fixed(char*) constructor converts a string representation of a fixed-point literal into a real fixed-point value, with the trailing 'd' or 'D' optional." However, the CORBA 2.3 spec for a fixed point literal says (3.2.5.5): "A fixed-point decimal literal consists of an integer part, a decimal point, a fraction part and a d or D. The integer and fraction parts both consist of a sequence of decimal (base 10) digits. Either the integer part or the fraction part (but not both) may be missing; the decimal point (but not the letter d (or D)) may be missing." This means that the following call is illegal: CORBA::Fixed f("-1.0"); Even though this can be rewritten (legally) as: CORBA::Fixed f(-CORBA::Fixed("1.0")); I think it would be a good idea change the definition of the constructor to also allow an optional sign (+ or -). -- Jon Biggar Floorboard Software jon@floorboard.com jon@biggar.org X-Sender: vinoski@mail.boston.iona.ie X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 Date: Fri, 24 Sep 1999 18:12:12 -0400 To: Jonathan Biggar From: Steve Vinoski Subject: Re: Fixed(const char *) constructor problem Cc: cxx_revision@omg.org In-Reply-To: <37EBD374.FFDC1F59@floorboard.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-UIDL: /W,e9$6#!!C(Le9iZ4e9 I completely agree. --steve At 12:39 PM 9/24/99 -0700, Jonathan Biggar wrote: >The CORBA 2.3 C++ spec says (1.11): > >"The Fixed(char*) constructor converts a string representation of a >fixed-point literal into a real fixed-point value, with the trailing 'd' >or 'D' optional." > >However, the CORBA 2.3 spec for a fixed point literal says (3.2.5.5): > >"A fixed-point decimal literal consists of an integer part, a decimal >point, a fraction part and a d or D. The integer and fraction parts both >consist of a sequence of decimal (base 10) digits. Either the integer >part or the fraction part (but not both) may be missing; the decimal >point (but not the letter d (or D)) may be missing." > >This means that the following call is illegal: > > CORBA::Fixed f("-1.0"); > >Even though this can be rewritten (legally) as: > > CORBA::Fixed f(-CORBA::Fixed("1.0")); > >I think it would be a good idea change the definition of the constructor >to also allow an optional sign (+ or -). > >-- >Jon Biggar >Floorboard Software >jon@floorboard.com >jon@biggar.org Sender: jon@floorboard.com Message-ID: <3855C7F8.95CFA698@floorboard.com> Date: Mon, 13 Dec 1999 20:30:48 -0800 From: Jonathan Biggar X-Mailer: Mozilla 4.7 [en] (X11; U; SunOS 5.5.1 sun4m) X-Accept-Language: en MIME-Version: 1.0 To: cxx_revision@omg.org Subject: Proposals for issues 2947, 2949, 2950 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: &/o!!b#c!!;I$!!2,S!! ------------------------------------------------------------------------------------ Issue 2949: Fixed(const char *) constructor problem Proposal: Change the sentence in Section 1.11 describing the Fixed(char *) constructor from: "The Fixed(char*) constructor converts a string representation of a fixed-point literal into a real fixed-point value, with the trailing 'd' or 'D' optional." to: "The Fixed(char*) constructor converts a string representation of a fixed-point literal into a real fixed-point value, with an optional leading sign (+ or -) and an optional trailing 'd' or 'D'." From: Paul Kyzivat To: "'Jonathan Biggar'" , cxx_revision@omg.org Subject: RE: Proposals for issues 2947, 2949, 2950 Date: Wed, 15 Dec 1999 19:44:47 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" X-UIDL: 68*e9,;V!!^mO!!&mh!! > Issue 2949: Fixed(const char *) constructor problem > > Proposal: > > Change the sentence in Section 1.11 describing the Fixed(char *) > constructor from: > > "The Fixed(char*) constructor converts a string representation of a > fixed-point literal into a real fixed-point value, with the > trailing 'd' or 'D' optional." > > to: > > "The Fixed(char*) constructor converts a string representation of a > fixed-point literal into a real fixed-point value, with an optional > leading sign (+ or -) and an optional trailing 'd' or 'D'." That still reads oddly. How about: "The Fixed(char*) constructor converts a string representation of a fixed-point literal, with an optional leading sign (+ or -) and an optional trailing 'd' or 'D', into a real fixed-point value." Sender: jbiggar@floorboard.com Message-ID: <38583743.6F03D97D@floorboard.com> Date: Wed, 15 Dec 1999 16:50:11 -0800 From: Jonathan Biggar X-Mailer: Mozilla 4.7 [en] (X11; U; SunOS 5.6 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: Paul Kyzivat CC: cxx_revision@omg.org Subject: Re: issue 2949 References: <9B164B713EE9D211B6DC0090273CEEA9140259@bos1.noblenet.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: LaVd9X4C!!(0Zd9M~*!! Paul Kyzivat wrote: > > "The Fixed(char*) constructor converts a string representation of a > > fixed-point literal into a real fixed-point value, with an optional > > leading sign (+ or -) and an optional trailing 'd' or 'D'." > > That still reads oddly. How about: > > "The Fixed(char*) constructor converts a string representation of a > fixed-point literal, with an optional leading sign (+ or -) and an > optional trailing 'd' or 'D', into a real fixed-point value." Fine by me. -- Jon Biggar Floorboard Software jon@floorboard.com jon@biggar.org Date: Fri, 17 Dec 1999 07:40:42 +1000 (EST) From: Michi Henning To: Paul Kyzivat cc: "'Jonathan Biggar'" , cxx_revision@omg.org Subject: RE: Proposals for issues 2947, 2949, 2950 In-Reply-To: <9B164B713EE9D211B6DC0090273CEEA9140259@bos1.noblenet.com> Message-ID: Organization: Object Oriented Concepts MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-UIDL: Lkdd9~)E!!XS4!!pV>!! On Wed, 15 Dec 1999, Paul Kyzivat wrote: > > Issue 2949: Fixed(const char *) constructor problem > > > > Proposal: > > > > Change the sentence in Section 1.11 describing the Fixed(char *) > > constructor from: > > > > "The Fixed(char*) constructor converts a string representation of > a > > fixed-point literal into a real fixed-point value, with the > > trailing 'd' or 'D' optional." > > > > to: > > > > "The Fixed(char*) constructor converts a string representation of > a > > fixed-point literal into a real fixed-point value, with an > optional > > leading sign (+ or -) and an optional trailing 'd' or 'D'." No change is necessary at all. The grammar for constant expressions already permits a unary minues (production 37). So, the above would result in an optional sign being made part of the literal, when no such sign is needed. Cheers, Michi. -- Michi Henning +61 7 3891 5744 Object Oriented Concepts +61 4 1118 2700 (mobile) Suite 4, 904 Stanley St +61 7 3891 5009 (fax) East Brisbane 4169 michi@ooc.com.au AUSTRALIA http://www.ooc.com.au/staff/michi-henning.html Sender: jon@floorboard.com Message-ID: <38596094.260D904@floorboard.com> Date: Thu, 16 Dec 1999 13:58:44 -0800 From: Jonathan Biggar X-Mailer: Mozilla 4.7 [en] (X11; U; SunOS 5.5.1 sun4m) X-Accept-Language: en MIME-Version: 1.0 To: Michi Henning CC: Paul Kyzivat , cxx_revision@omg.org Subject: Re: Proposals for issues 2947, 2949, 2950 References: Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: -HK!!986e9^$d!!NE"!! Michi Henning wrote: > > On Wed, 15 Dec 1999, Paul Kyzivat wrote: > > > > Issue 2949: Fixed(const char *) constructor problem > > > > > > Proposal: > > > > > > Change the sentence in Section 1.11 describing the Fixed(char *) > > > constructor from: > > > > > > "The Fixed(char*) constructor converts a string representation > of a > > > fixed-point literal into a real fixed-point value, with the > > > trailing 'd' or 'D' optional." > > > > > > to: > > > > > > "The Fixed(char*) constructor converts a string representation > of a > > > fixed-point literal into a real fixed-point value, with an > optional > > > leading sign (+ or -) and an optional trailing 'd' or 'D'." > > No change is necessary at all. The grammar for constant expressions > already permits a unary minues (production 37). So, the above would > result > in an optional sign being made part of the literal, when no such > sign is > needed. Michi, this is for the Fixed(char *) C++ constructor, not the IDL grammar. Did you take a complete look at the issue text? -- Jon Biggar Floorboard Software jon@floorboard.com jon@biggar.org Date: Fri, 17 Dec 1999 08:54:34 +1000 (EST) From: Michi Henning To: Jonathan Biggar cc: Paul Kyzivat , cxx_revision@omg.org Subject: Re: Proposals for issues 2947, 2949, 2950 In-Reply-To: <38596094.260D904@floorboard.com> Message-ID: Organization: Object Oriented Concepts MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-UIDL: +(U!!m%ad9XPV!!OX8e9 On Thu, 16 Dec 1999, Jonathan Biggar wrote: > > No change is necessary at all. The grammar for constant expressions > > already permits a unary minues (production 37). So, the above would result > > in an optional sign being made part of the literal, when no such sign is > > needed. > > Michi, this is for the Fixed(char *) C++ constructor, not the IDL > grammar. Did you take a complete look at the issue text? Oops. Insert foot firmly into mouth and bite down hard... :-( Cheers, Michi. -- Michi Henning +61 7 3891 5744 Object Oriented Concepts +61 4 1118 2700 (mobile) Suite 4, 904 Stanley St +61 7 3891 5009 (fax) East Brisbane 4169 michi@ooc.com.au AUSTRALIA http://www.ooc.com.au/staff/michi-henning.html