Re: Hiding Brands
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 57396
interpreted = N
texte = Donovan Brooke wrote:> Logically, A contains showif like:> [showif _apple_fred_willma_^_ap_]> yes> [/showif]> > should result to "yes" but it doesn't because thats not how the stamenet > works.I understand you fine, but you are missing _my_ point. Let me put quotes around the strings so you can see:The string "_ap_" is not present in the strings "_apple_" or "_fred_" or "_wilma_", so the [showif doesn't fire] The contains operator "^" takes everything to the right /as a string/ and tries to find it, _exactly_ on the left hand side, /as a string/; the underlying C routine is call instr().The construct we are talking about is an old trick of wrapping an unknown value with known characters, then mashing all possible values together into a single string, seperated by the known character. Only a single match is desired. You can consider this doing a logical OR using string operations.> IMO, it would have been more logical to impliment this "feature" in the "=" scenerio...> [hideif _a_b_c_=_[value]_]> yes> [/hideif]You are missing the point here as well. There is nothing special about the '_' in this case; any character which isn't also present in either the choices or the [value] can be used (as long as that character doesn't have any additional meaning).For that matter, this should also work[hideif 'a'b'c'd'^'[value]']since in that context, the single quote has no special meaning. Don't try that in an [if] context though.Got it now?John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748-------------------------------------------------------------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:
Donovan Brooke wrote:> Logically, A contains showif like:> [showif _apple_fred_willma_^_ap_]> yes> [/showif]> > should result to "yes" but it doesn't because thats not how the stamenet > works.I understand you fine, but you are missing _my_ point. Let me put quotes around the strings so you can see:The string "_ap_" is not present in the strings "_apple_" or "_fred_" or "_wilma_", so the [showif doesn't fire] The contains operator "^" takes everything to the right /as a string/ and tries to find it, _exactly_ on the left hand side, /as a string/; the underlying C routine is call instr().The construct we are talking about is an old trick of wrapping an unknown value with known characters, then mashing all possible values together into a single string, seperated by the known character. Only a single match is desired. You can consider this doing a logical OR using string operations.> IMO, it would have been more logical to impliment this "feature" in the "=" scenerio...> [hideif _a_b_c_=_[value]_]> yes> [/hideif]You are missing the point here as well. There is nothing special about the '_' in this case; any character which isn't also present in either the choices or the [value] can be used (as long as that character doesn't have any additional meaning).For that matter, this should also work[hideif 'a'b'c'd'^'[value]']since in that context, the single quote has no special meaning. Don't try that in an [if] context though.Got it now?John-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4501 Forbes BoulevardSuite HLanham, MD 20706301-459-3366 x.5010fax 301-429-5748-------------------------------------------------------------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/
John Peacock
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:
Upgrade to 3.07 problems (2000)
Bit off subject -- Faxing orders (1997)
[WebDNA] WebDNA 7 (2011)
Running 2 two WebCatalog.acgi's (1996)
[OT] Internet Access (2003)
Using Plug-In while running 1.6.1 (1997)
Purchase Plugin Missing (1996)
Here's how to kill a Butler Database. (1997)
Permission Denied Error (2001)
FW: Shipping calculations (1997)
[TaxableTotal] - not working with AOL and IE (1997)
[isfolder] and [filename] (1997)
3.08 has trouble keeping the serial # ?? (2000)
Re1000001: Setting up shop (1997)
using showpage and showcart commands (1996)
Undeliverable Mail (1997)
FYI: virus alert (1996)
WebCat on 10.0.4 - iTools 6.0 (2001)
Problems reading files created by WC (1997)
an easy one... (2000)