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 Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 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:

    
  1. Re: Hiding Brands ( Terry Wilson 2004)
  2. Re: Hiding Brands ( William DeVaul 2004)
  3. Re: Hiding Brands ( Clint Davis 2004)
  4. Re: Hiding Brands ( John Peacock 2004)
  5. Re: Hiding Brands ( Donovan Brooke 2004)
  6. Re: Hiding Brands ( John Peacock 2004)
  7. Re: Hiding Brands ( Donovan Brooke 2004)
  8. Re: Hiding Brands ( John Peacock 2004)
  9. Re: Hiding Brands ( Donovan Brooke 2004)
  10. Re: Hiding Brands ( Alan White 2004)
  11. Re: Hiding Brands ( John Peacock 2004)
  12. Re: Hiding Brands ( Alan White 2004)
  13. Re: Hiding Brands ( John Peacock 2004)
  14. Re: Hiding Brands ( Donovan Brooke 2004)
  15. Re: Hiding Brands ( Rob Marquardt 2004)
  16. Hiding Brands ( Alan White 2004)
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 Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 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:

To Err or Not Custom Error (1999) [SHOWIF AND/OR] (1997) [showif]/[hideif] question (1997) Country & Ship-to address & other fields ? (1997) Who needs Yoda! (2002) in header include files? (1998) version 2 for NT (1997) WebCatalog can't find database (1997) [WebDNA] webdna7 sendmail error (2012) Showif Context combined with Search (1997) [HIDEIF] inside [FOUNDITEM] (1997) suffix mapping for NT? (1997) OT: Collaborative Browsing (2000) PCS Frames (1997) Bug or syntax error on my part? (1997) RAM variables (1997) OFF TOPIC: Sendmail problem (2003) cookie question (2002) Need some assistance. (1999) Pull down menu for categories (2000)