Re: [WebDNA] divisible by 1

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106945
interpreted = N
texte = I'd use grep and look for [0-9] Bill On Wed, Jul 13, 2011 at 3:26 PM, Kenneth Grome wrote: > 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. =A0Half my tests >> produce the wrong value when I multiply by zero: >> >> [math]0*123.45[/math] =3D 0 -- correct >> [math]0*123,45[/math] =3D 45 -- WRONG, should be blank >> [math]0*123.a[/math] =3D 0 -- WRONG, should be blank >> [math]0*abc[/math] =3D (blank) -- correct >> [math]0*123[/math] =3D 0 -- correct >> [math]0*123 45[/math] =3D 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. =A0Don'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 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us > Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] divisible by 1 (Marc Thompson 2011)
  2. Re: [WebDNA] divisible by 1 (Donovan Brooke 2011)
  3. Re: [WebDNA] divisible by 1 (Christer Olsson 2011)
  4. Re: [WebDNA] divisible by 1 (Donovan Brooke 2011)
  5. Re: [WebDNA] divisible by 1 (Stuart Tremain 2011)
  6. Re: [WebDNA] divisible by 1 (Kenneth Grome 2011)
  7. Re: [WebDNA] divisible by 1 (Kenneth Grome 2011)
  8. Re: [WebDNA] divisible by 1 (Stuart Tremain 2011)
  9. Re: [WebDNA] divisible by 1 (Kenneth Grome 2011)
  10. Re: [WebDNA] divisible by 1 (Kenneth Grome 2011)
  11. Re: [WebDNA] divisible by 1 (Govinda 2011)
  12. Re: [WebDNA] divisible by 1 (Govinda 2011)
  13. Re: [WebDNA] divisible by 1 (Kenneth Grome 2011)
  14. Re: [WebDNA] divisible by 1 (Ronald Kirkland 2011)
  15. Re: [WebDNA] divisible by 1 (Marc Thompson 2011)
  16. Re: [WebDNA] divisible by 1 (William DeVaul 2011)
  17. Re: [WebDNA] divisible by 1 (Kenneth Grome 2011)
  18. Re: [WebDNA] divisible by 1 (Kenneth Grome 2011)
  19. Re: [WebDNA] divisible by 1 (Govinda 2011)
  20. [WebDNA] divisible by 1 (Kenneth Grome 2011)
I'd use grep and look for [0-9] Bill On Wed, Jul 13, 2011 at 3:26 PM, Kenneth Grome wrote: > 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. =A0Half my tests >> produce the wrong value when I multiply by zero: >> >> [math]0*123.45[/math] =3D 0 -- correct >> [math]0*123,45[/math] =3D 45 -- WRONG, should be blank >> [math]0*123.a[/math] =3D 0 -- WRONG, should be blank >> [math]0*abc[/math] =3D (blank) -- correct >> [math]0*123[/math] =3D 0 -- correct >> [math]0*123 45[/math] =3D 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. =A0Don'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 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us > William DeVaul

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:

Multiple catalog databases and showcart (1997) default error on NT? (1997) Practice runs ? (1997) Weird Math (2000) TCPConnect and SSL servers (2001) help! problem using [referrer] still in 2.01 (1997) referrer and no caches (1997) listfiles, moving files (1998) Showif for mulitple variations (1997) hideif/showif causes error if wrapped around searches (2003) webcat and OS 8 (1997) WebCatalog can't find database (1997) Bug Report, maybe (1997) Format question WC Mac f3 (1997) 3.0 [TEXT] variables (1998) Generating unique SKU from [cart] - Still Stumped... (1997) RE: A zip code search (1998) Duplicates (1998) When do we get to request new features? (1999) credit card (1997)