Re: Is [variable] a Number?

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 69004
interpreted = N
texte = Donovan's idea below seems to also work for negatives as well. Here is the code I used to test it (along with some feedback to see what is being changed) [text]VART=-1123[/text] [text]PASS=no[/text] [showif [url][math show=T][VART][/math][/url]=[url][VART][/url]] [text]PASS=yes[/text] [/showif] [PASS]
[math show=T]abs([VART])[/math]
[vart]
----------------------------- Vart=-123 passes Vart=123 passes Vart=123A fails Vart=-123A fails Vart=ABC fails Looks like this is your winner. HTH Alex On 5/25/07 12:03 PM, "Donovan Brooke" wrote: > > Maybe an easier way: > [text]ismath=no[/text] > [showif [url][math > show=T]variabletotest[/math][/url]![url]variabletotest[/url]] > [text]ismath=yes[/text] > [/showif] > > This may work because one doesn't need the brackets with math vars when inside > a math context. > (both untested) > > Donovan -- Alex J. McCombie .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adventure Skies Interactive Box 124 Martville, NY 13111 p. 315 .233 .9403 e. Alex@AdventureSkies.com www.AdventureSkies.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Is [variable] a Number? ( Paul Willis 2007)
  2. Re: Is [variable] a Number? ( Alex McCombie 2007)
  3. Re: Is [variable] a Number? ( Alex McCombie 2007)
  4. Re: Is [variable] a Number? ( Donovan Brooke 2007)
  5. Re: Is [variable] a Number? ( Clint Davis 2007)
  6. Re: Is [variable] a Number? ( Donovan Brooke 2007)
  7. Is [variable] a Number? ( Clint Davis 2007)
Donovan's idea below seems to also work for negatives as well. Here is the code I used to test it (along with some feedback to see what is being changed) [text]VART=-1123[/text] [text]PASS=no[/text] [showif [url][math show=T][VART][/math][/url]=[url][VART][/url]] [text]PASS=yes[/text] [/showif] [PASS]
[math show=T]abs([VART])[/math]
[vart]
----------------------------- Vart=-123 passes Vart=123 passes Vart=123A fails Vart=-123A fails Vart=ABC fails Looks like this is your winner. HTH Alex On 5/25/07 12:03 PM, "Donovan Brooke" wrote: > > Maybe an easier way: > [text]ismath=no[/text] > [showif [url][math > show=T]variabletotest[/math][/url]![url]variabletotest[/url]] > [text]ismath=yes[/text] > [/showif] > > This may work because one doesn't need the brackets with math vars when inside > a math context. > (both untested) > > Donovan -- Alex J. McCombie .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adventure Skies Interactive Box 124 Martville, NY 13111 p. 315 .233 .9403 e. Alex@AdventureSkies.com www.AdventureSkies.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Alex McCombie

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:

Shopping Cart Problem (1998) lookup command (1997) WebCatalog on LinuxPPC (2000) Heads up, cookies *may* be outlawed in Europe (2001) Help! WebCat2 bug (1997) Re:2nd WebCatalog2 Feature Request (1996) Plugin or CGI or both (1997) Weird error/limit - something amiss? (1997) turning every 5th line red (1998) problems with 2 tags shakur (1997) TRAINING videos - Prove IT. (1998) emailer setup (1997) [WebDNA] TLS 1.2 and [tcpconnect] (2018) encryption madness (2003) math on date? (1997) WebDNA for Window 2000 Server (2003) Digest for 4/18/97 (1997) [WebDNA] postfix and dna (2011) WebCatalog for Postcards ? (1997) log out (2001)