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:
[WebDNA] ListMIMEHeaders (2008)
Text data with spaces in them... (1997)
multiple record replace (2001)
Deleting Orders (1997)
rounding onlu UP (2002)
Nested Loops and SHOWIFs (1997)
DataBaseHelper Flawed (1997)
Separate SSL Server (1997)
SSL data to/from webcatalog? (2000)
Shownext on AOL (2003)
[LOOKUP] (1997)
Undeclared variables (2004)
server2003 isolation mode (2004)
searching illegal HTML (2002)
Pithy questions on webcommerce & siteedit (1997)
Can't use old cart file (was One more try) (1997)
no template caching (1997)
Database changes (1998)
[WebDNA] Yet another call for hosts... (2009)
Multiple security dbs (1997)