Re: [WebDNA] divisible by 1
This WebDNA talk-list message is from 2011
It keeps the original formatting.
numero = 106943
interpreted = N
texte = > off the top of my head, I think I would just multiply by> zero to confirm a number ...Good thought except that it doesn't work. Half my tests produce the wrong value when I multiply by zero:[math]0*123.45[/math] = 0 -- correct[math]0*123,45[/math] = 45 -- WRONG, should be blank[math]0*123.a[/math] = 0 -- WRONG, should be blank[math]0*abc[/math] = (blank) -- correct[math]0*123[/math] = 0 -- correct[math]0*123 45[/math] = 0 -- WRONG, should be blankI also tried the module operator with similar results.Maybe this should be a considered a bug since [math] should return a blank result if one of the values in the formula is non-numeric. Don't you think?As it is now we can never trust that the values used in a [math] calculation are actually numbers when non-numbers are producing results like 0 or 45.:(Sincerely,Kenneth Grome
Associated Messages, from the most recent to the oldest:
> off the top of my head, I think I would just multiply by> zero to confirm a number ...Good thought except that it doesn't work. Half my tests produce the wrong value when I multiply by zero:
[math]0*123.45[/math] = 0 -- correct
[math]0*123,45[/math] = 45 -- WRONG, should be blank
[math]0*123.a[/math] = 0 -- WRONG, should be blank
[math]0*abc[/math] = (blank) -- correct
[math]0*123[/math] = 0 -- correct
[math]0*123 45[/math] = 0 -- WRONG, should be blankI also tried the module operator with similar results.Maybe this should be a considered a bug since
[math] should return a blank result if one of the values in the formula is non-numeric. Don't you think?As it is now we can never trust that the values used in a
[math] calculation are actually numbers when non-numbers are producing results like 0 or 45.:(Sincerely,Kenneth Grome
Kenneth Grome
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Search minus first found (1999)
RE: (1997)
[WebDNA] WebDNA 8.6 announced - New features (2018)
[WebDNA] math variables bug in OSX 7.0 / 7.1 (2012)
[OT] Display Glitch (2004)
New syntax feedback for 4.0 (2000)
form crasehes server (1997)
apparently to problem isolated (1997)
text size limitation (1997)
groupSearch help needed (2002)
WebCat2 several catalogs? (1997)
AOL (1999)
Emailer setup (1997)
What am I missing (1997)
PIXO support (1997)
.cgi with webdna (2004)
[exclusivelock] (was:several people...) (2001)
Looking for a host (1997)
insecuretextvars preference doesn't work (2000)
[WebDNA] Calendar Edit (2010)