Re: Is [variable] a Number?

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 69001
interpreted = N
texte = On 5/25/07 10:59 AM, "Donovan Brooke" wrote: > 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. > > So you *do* still code WebDNA. ;-) I have to maintain my existing WebDNA sites, but it would be nice if my clients forked over the cash to rebuild in PHP :) > I suppose this would do it: > > [text]ismath=no[/text] > [listvariables type=math] > [showif [url][raw][variable_to_test][/raw][/url]=[url][[name]][/url]] > [text]ismath=yes[/text] > [/showif] > [/listvariables] I'm actually wanting to test a form variable. I was thinking maybe something like this, but I haven't tested it: [if [math][ZipCode]/1[/math]=[ ZipCode]] .... ------------------------------------------------------------- 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)
On 5/25/07 10:59 AM, "Donovan Brooke" wrote: > 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. > > So you *do* still code WebDNA. ;-) I have to maintain my existing WebDNA sites, but it would be nice if my clients forked over the cash to rebuild in PHP :) > I suppose this would do it: > > [text]ismath=no[/text] > [listvariables type=math] > [showif [url][raw][variable_to_test][/raw][/url]=[url][[name]][/url]] > [text]ismath=yes[/text] > [/showif] > [/listvariables] I'm actually wanting to test a form variable. I was thinking maybe something like this, but I haven't tested it: [if [math][ZipCode]/1[/math]=[ ZipCode]] .... ------------------------------------------------------------- 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/ Clint Davis

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:

WebCatalog2 Feature Feedback (1996) [Solved - with code] catching WebDNA error messages (2003) SKU lookup (1997) PCS Emailer's role ? (1997) WC2.0 Memory Requirements (1997) WriteFile wrong format (2003) Daze to Dates (1998) WebCat2 - Getting to the browser's username/password data (1997) [WebDNA] LIST FILES - Stupid results (2016) WebCat2 - many [carts] on one template page? (1997) Zipcodes (1998) [BULK] [WebDNA] abstraction code can be tricky... (2012) [ListFiles] context & alias (1997) Add htmlarea 3 to SiteBuilder (2004) .htm file tags not showing up (2000) Counting LineItems (2000) PCS Frames (1997) For those of you not on the WebCatalog Beta... (1997) HELP WITH DATES (1997) [ModDate] & [ModTime] ? (1997)