Re: proper way to check if a container is empty?
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 27127
interpreted = N
texte = >The best way is to do this:>>[showif [URL][NIS][/URL]=%5BNIS%5D]> [math show=f]NIS=0[/math]>[/showif]>>in general, because if it's possible that a variable may have user input,>they may be putting in characters that are comparison operators (like><,>,=,!) that could mess up statement. This would resolve those problems.In general this is true, but you can take advantage of the left-to-right parsing of the [ShowIf] context this way:[ShowIf =[NIS]](Notice there's only one space after the ShowIf) this reads as show if 'nothing' equals the value of the [NIS] variableNow I should also point out that this is very different from checking if a variable is undefined. It's one thing to say that a variable has been defined, and it has a value of , the empty string. It's another thing entirely to say that a variable has not been defined at all, and it has no value whatsoever.Technical Support **********************************Smith Micro, Internet Solutions Div | Formerly, Pacific Coast Software16855 West Bernardo Drive | -------------------------Suite 380 | eCommerce (WebCatalog)San Diego, CA 92127 | Software & Site Development858.675.1106 | http://www.smithmicro.com858.675.0372 (fax) **********************************-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to
.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
Associated Messages, from the most recent to the oldest:
>The best way is to do this:>>[showif [url][NIS][/URL]=%5BNIS%5D]> [math show=f]NIS=0[/math]>[/showif]>>in general, because if it's possible that a variable may have user input,>they may be putting in characters that are comparison operators (like><,>,=,!) that could mess up statement. This would resolve those problems.In general this is true, but you can take advantage of the left-to-right parsing of the [showif] context this way:[ShowIf =[NIS]](Notice there's only one space after the ShowIf) this reads as show if 'nothing' equals the value of the [NIS] variableNow I should also point out that this is very different from checking if a variable is undefined. It's one thing to say that a variable has been defined, and it has a value of , the empty string. It's another thing entirely to say that a variable has not been defined at all, and it has no value whatsoever.Technical Support **********************************Smith Micro, Internet Solutions Div | Formerly, Pacific Coast Software16855 West Bernardo Drive | -------------------------Suite 380 | eCommerce (WebCatalog)San Diego, CA 92127 | Software & Site Development858.675.1106 | http://www.smithmicro.com858.675.0372 (fax) **********************************-------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .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
WebDNA Support
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:
View order not right (1997)
WebDNA on OS X Tiger (2006)
possible, WebCat2.0 and checkboxes-restated (1997)
[SearchString] problem with [search] context (1997)
Webdna is dead! (2003)
Emailer setup (1997)
Apache/Mod-SSL & WebCatalog (UNIX)! module bug? (2000)
locking variables? (2000)
Country & Ship-to address & other fields ? (1997)
[WebDNA] Download not load into browser (2014)
Bug Report, maybe (1997)
remotely add + sign (1997)
windows v4.5.1 (2003)
[WebDNA] Issues regarding static vs. dynamic pages (2011)
wild question (1998)
Car Database (2002)
Bug Report, maybe (1997)
[CART] inside a [LOOP] (1997)
sort on categories (DBEdit) (2001)
WebCat.acgi from /cgi-bin/? (1997)