Re: [WebDNA] divisible by 1
This WebDNA talk-list message is from 2011
It keeps the original formatting.
numero = 106944
interpreted = N
texte = I decided to check every char via [listchars] but the code is relatively simple and it actually works now.Sincerely,Kenneth Grome> > 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 blank> > I 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:
I decided to check every char via
[listchars] but the code is relatively simple and it actually works now.Sincerely,Kenneth Grome> > 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 blank> > I 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:
checking for [ and ] in form fields ... (1997)
[WebDNA] WebDNA on LiveCD ... (2008)
Problems with Price field (1997)
Expiration of Carts (1997)
Running 2 two WebCatalog.acgi's (1996)
WebCat2.0 [format thousands .0f] no go (1997)
RAM variables (1997)
PSC recommends what date format yr 2000??? (1997)
Problem about [CART] number (1998)
[unitshipcost] values do NOT write to orderfile (1998)
Are you an WC expert? (1997)
CloseDataBase vs CommitDataBase (2007)
Caching [include] files ... (1997)
Re:Has this happened to you? (1997)
WebCat2.0 [format thousands .0f] no go (1997)
Color options - modified (1999)
FTP FOLDER PERMISSIONS (2004)
carriage returns in data (1997)
Problem with pull down menu (1998)
Re:Emailer and encryption (1997)