Re: Is [variable] a Number?

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 69003
interpreted = N
texte = As long as you don't have to worry about negative numbers then the following will work: [text]PASS=no[/text] [showif [url][math show=T]abs([VART])[/math][/url]=[url][VART][/url]] [text]PASS=yes[/text] [/showif] VART is the variable you are passing. It will work on all numbers and letters but will fail if the number you are checking is a negative (-40) HTH Alex On 5/25/07 11:48 AM, "Clint Davis" wrote: > How can I test a variable to make sure it's a number? I remember reading > something on the list some time ago, but I can't find it. > > -- 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? ( Alex McCombie 2007)
  2. Is [variable] a Number? ( Clint Davis 2007)
As long as you don't have to worry about negative numbers then the following will work: [text]PASS=no[/text] [showif [url][math show=T]abs([VART])[/math][/url]=[url][VART][/url]] [text]PASS=yes[/text] [/showif] VART is the variable you are passing. It will work on all numbers and letters but will fail if the number you are checking is a negative (-40) HTH Alex On 5/25/07 11:48 AM, "Clint Davis" wrote: > How can I test a variable to make sure it's a number? I remember reading > something on the list some time ago, but I can't find it. > > -- 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:

Kaaaaahhhhhhhnnnnnnn! (1997) UPPERCASE (1997) Date search - yes or no (1997) Multihoming and webcat (1998) Fishing: anyone on this group willing to do support? (1998) 'Document Contains No Data' (1999) & in Lookups (1997) Need a Calendar System (2001) Not sending email !!! (2002) OFF-TOPIC: Check www.godaddy.com for me ... (2003) Download (1999) WC2.0 Memory Requirements (1997) Stumped (1999) [WebDNA] Best WebDNA version for OS X Server 10.5.8 on PowerPC? (2010) Snake Bites (1997) OT - royalty free images (2002) NT BETA BUG???? (1997) 2nd WebCatalog2 Feature Request (1996) Location of Browser Info.txt file (1997) Multi-processor Mac info ... (1997)