Re: proper way to check if a container is empty?
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 27135
interpreted = N
texte = The reason this was *not* suggested is because it does not work when the value of [NIS] has a comparison operator in it -- but the way it was suggested, it works every time.>I think this is clearer: [showif [NIS]=] Easier to see the blank.>ml>>>> >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] variable>>>>Now 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 Software>>16855 West Bernardo Drive | ------------------------->>Suite 380 | eCommerce (WebCatalog)>>San Diego, CA 92127 | Software & Site Development>>858.675.1106 | http://www.smithmicro.com>>858.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 >> \|/> (. .)>_________________________ooO_(_)_Ooo_____________________________>Mark Lacas mailto:mark@lacas.com>Virtual Loft / Seattle HarborCam: http://www.loftcam.com/>SeattleStuff WebCommerce Community: http://www.seattlestuff.com/>>>------------------------------------------------------------->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 ================================Kenneth Grome, WebDNA Consultant808-737-6499, http://webdna.net================================-------------------------------------------------------------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 reason this was *not* suggested is because it does not work when the value of [NIS] has a comparison operator in it -- but the way it was suggested, it works every time.>I think this is clearer: [showif [NIS]=] Easier to see the blank.>ml>>>> >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] variable>>>>Now 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 Software>>16855 West Bernardo Drive | ------------------------->>Suite 380 | eCommerce (WebCatalog)>>San Diego, CA 92127 | Software & Site Development>>858.675.1106 | http://www.smithmicro.com>>858.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 >> \|/> (. .)>_________________________ooO_(_)_Ooo_____________________________>Mark Lacas mailto:mark@lacas.com>Virtual Loft / Seattle HarborCam: http://www.loftcam.com/>SeattleStuff WebCommerce Community: http://www.seattlestuff.com/>>>------------------------------------------------------------->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 ================================Kenneth Grome, WebDNA Consultant808-737-6499, http://webdna.net================================-------------------------------------------------------------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
Kenneth Grome
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:
More on the email templates (1997)
WebCat 2.1beta etc (1997)
Alternating colors (1997)
Delete context run amok (2005)
when is date system date or order date? (1997)
[append] problem (1997)
Happy New Year (2002)
Cut off from the list and can't get an answer to the confused re:QTY price updating question (1998)
[WebDNA] Security Images (Captcha) (2008)
page redirect in webDNA (1997)
Using Applescript to process WebCatalog functions (1998)
HTML Editors (1997)
Standalone Testing (1998)
webcat and OS 8 (1997)
MacAutorize and T1 (1998)
WC1.6 to WC2 date formatting -FIXED! (1997)
Summing fields (1997)
Searchable archives gone again??? (2000)
For those of you not on the WebCatalog Beta... (1997)
WebStar 3 crackable !!!! (1998)