Re: Value returned by CInt("+1")
Hi Carl, Le 18/06/22 à 17:49, Carl Marcum a écrit : I see that VBA does handle this now. I don't know if that was always the case. When tested on a VBA version Excel 2003, CLng("+1") returns 1 Best regards, Lucien Hi Czesław, On 6/16/22 6:58 AM, Czesław Wolański wrote: Hi, The problem was reported yesterday on the English forum: topic "CINT("+1") returns 0". https://forum.openoffice.org/en/forum/viewtopic.php?p=525249=0481325a63f94adf45c49ba4175701d7#p525249 In version 4.1.12, CLng("+1") returns 0 too. I haven't found any relevant report in Bugzilla. Do you think this problem is "Bugzilla-worthy"? Kind regards, Czesław - To unsubscribe, e-mail: qa-unsubscr...@openoffice.apache.org For additional commands, e-mail: qa-h...@openoffice.apache.org - To unsubscribe, e-mail: qa-unsubscr...@openoffice.apache.org For additional commands, e-mail: qa-h...@openoffice.apache.org
Re: Value returned by CInt("+1")
Hi Carl, all Thank you for your insight. A few observations on my part: (1) isNumeric("+1") returns False (2) for "+1" argument: CInt() and CLng() produce 0, CDec() gives 1 whereas CSng() and CDbl() - an error "Inadmissible value or data type. Data type mismatch" (3) the help text you quoted is in description of the above functions; except for CDec() All in all, I agree that both the bug and the enhancement need to be considered. Best regards, Czesław Le sam. 18 juin 2022 à 19:39, a écrit : > Sorry, it is > > +#,##0.00;-#,##0.00;0.00 > > (stray ";" below) > > -Original Message- > From: dennis.hamil...@acm.org > Sent: Saturday, June 18, 2022 10:37 > To: 'qa@openoffice.apache.org' > Subject: RE: Value returned by CInt("+1") > > Excel has it so there has to be a solution in AOO Calc. And indeed there > is. > > It is in the built-in Help under Number Format Codes. Here is a > conventional > sign everything and show 0's format code for currency values (without any > $) > that I use in some investment tracking. > > +#,##0.00;-#,##0.00;; 0.00 > > -Original Message- > From: Carl Marcum > Sent: Saturday, June 18, 2022 08:49 > To: qa@openoffice.apache.org > Subject: Re: Value returned by CInt("+1") > > [orcmid] [ ... ] > > If I enter +1 into a cell my default number format changes it to a 1. > I haven't found any number format options where positive values have a > leading > + but I haven't checked them all. > > [orcmid] [ ... ] > > > - > To unsubscribe, e-mail: qa-unsubscr...@openoffice.apache.org > For additional commands, e-mail: qa-h...@openoffice.apache.org > > > > - > To unsubscribe, e-mail: qa-unsubscr...@openoffice.apache.org > For additional commands, e-mail: qa-h...@openoffice.apache.org > >
RE: Value returned by CInt("+1")
Sorry, it is +#,##0.00;-#,##0.00;0.00 (stray ";" below) -Original Message- From: dennis.hamil...@acm.org Sent: Saturday, June 18, 2022 10:37 To: 'qa@openoffice.apache.org' Subject: RE: Value returned by CInt("+1") Excel has it so there has to be a solution in AOO Calc. And indeed there is. It is in the built-in Help under Number Format Codes. Here is a conventional sign everything and show 0's format code for currency values (without any $) that I use in some investment tracking. +#,##0.00;-#,##0.00;; 0.00 -Original Message- From: Carl Marcum Sent: Saturday, June 18, 2022 08:49 To: qa@openoffice.apache.org Subject: Re: Value returned by CInt("+1") [orcmid] [ ... ] If I enter +1 into a cell my default number format changes it to a 1. I haven't found any number format options where positive values have a leading + but I haven't checked them all. [orcmid] [ ... ] - To unsubscribe, e-mail: qa-unsubscr...@openoffice.apache.org For additional commands, e-mail: qa-h...@openoffice.apache.org - To unsubscribe, e-mail: qa-unsubscr...@openoffice.apache.org For additional commands, e-mail: qa-h...@openoffice.apache.org
RE: Value returned by CInt("+1")
Excel has it so there has to be a solution in AOO Calc. And indeed there is. It is in the built-in Help under Number Format Codes. Here is a conventional sign everything and show 0's format code for currency values (without any $) that I use in some investment tracking. +#,##0.00;-#,##0.00;; 0.00 -Original Message- From: Carl Marcum Sent: Saturday, June 18, 2022 08:49 To: qa@openoffice.apache.org Subject: Re: Value returned by CInt("+1") [orcmid] [ ... ] If I enter +1 into a cell my default number format changes it to a 1. I haven't found any number format options where positive values have a leading + but I haven't checked them all. [orcmid] [ ... ] - To unsubscribe, e-mail: qa-unsubscr...@openoffice.apache.org For additional commands, e-mail: qa-h...@openoffice.apache.org - To unsubscribe, e-mail: qa-unsubscr...@openoffice.apache.org For additional commands, e-mail: qa-h...@openoffice.apache.org
Re: Value returned by CInt("+1")
Hi Czesław, On 6/16/22 6:58 AM, Czesław Wolański wrote: Hi, The problem was reported yesterday on the English forum: topic "CINT("+1") returns 0". https://forum.openoffice.org/en/forum/viewtopic.php?p=525249=0481325a63f94adf45c49ba4175701d7#p525249 In version 4.1.12, CLng("+1") returns 0 too. I haven't found any relevant report in Bugzilla. Do you think this problem is "Bugzilla-worthy"? Kind regards, Czesław If anything I think the bug is that it doesn't throw a runtime exception and returns an unexpected value. Not that it doesn't accept the + when used with a string like "+1". I see that VBA does handle this now. I don't know if that was always the case. The help text states" "... To convert a string expression, the number must be entered as normal text ("123.5") using the default number format of your operating system." If I enter +1 into a cell my default number format changes it to a 1. I haven't found any number format options where positive values have a leading + but I haven't checked them all. Beside the bug for the runtime exception there could be an enhancement request to handle the + leading the string value since VBA and LO have added it. Just my opinion. Best regards, Carl - To unsubscribe, e-mail: qa-unsubscr...@openoffice.apache.org For additional commands, e-mail: qa-h...@openoffice.apache.org