What about an ends with operator?

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 33060
interpreted = N
texte = I think it would be very useful to have an ends with comparison operator -- so when we use a showif inside a listfiles context, we would have a simple way to show only the files that END WITH a certain suffix.Practically all the files in a website have a suffix of one kind or another, right? So this seems like a very practical addition to the webdna language ... because it would let us very easily list specific file types without a whole lot of confusing code to deal with.As it is now, we have contains (^), but it cannot do the job on its own, which means we have to write a whole bunch of additional (relatively complex) code in order to get a simple list of all the .db files in a folder, or all the .tpl files in a folder, etc., etc.In other words, we cannot get what we want like this:[listfiles ...] [showif [filename]^.db]... because sometimes the .db is not at the end of the file name, such as when there's a stuffit file like something.db.sit in the folder. But if we had an ends with operator, for example *, then we could do it like this:[listfiles ...] [showif [filename]*.db]... because the something.db.sit file would NOT be shown, but the something.db file (and every other file ending with .db, which is exactly what we want) would be shown.Does anyone else think this is a good idea?================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: What about an ends with operator? (Kenneth Grome 2000)
  2. Re: What about an ends with operator? (Michael Winston 2000)
  3. Re: What about an ends with operator? (John Butler 2000)
  4. Re: What about an ends with operator? (Aaron Lynch 2000)
  5. What about an ends with operator? (Kenneth Grome 2000)
I think it would be very useful to have an ends with comparison operator -- so when we use a showif inside a listfiles context, we would have a simple way to show only the files that END WITH a certain suffix.Practically all the files in a website have a suffix of one kind or another, right? So this seems like a very practical addition to the webdna language ... because it would let us very easily list specific file types without a whole lot of confusing code to deal with.As it is now, we have contains (^), but it cannot do the job on its own, which means we have to write a whole bunch of additional (relatively complex) code in order to get a simple list of all the .db files in a folder, or all the .tpl files in a folder, etc., etc.In other words, we cannot get what we want like this:[listfiles ...] [showif [filename]^.db]... because sometimes the .db is not at the end of the file name, such as when there's a stuffit file like something.db.sit in the folder. But if we had an ends with operator, for example *, then we could do it like this:[listfiles ...] [showif [filename]*.db]... because the something.db.sit file would NOT be shown, but the something.db file (and every other file ending with .db, which is exactly what we want) would be shown.Does anyone else think this is a good idea?================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================------------------------------------------------------------- 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://search.smithmicro.com/ 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:

WebCat2final1 crashes (1997) New Shipping Options? (2001) WebCat mappings.. (2000) Re[2]: ftp access on Macos X (2000) 2.1b3 --> way slow (1997) Bit off subject -- Faxing orders (1997) Multiple prices (1997) Cookies (1999) 2nd WebCatalog2 Feature Request (1996) Database Field Additions (2000) Time formatting in linux (2006) Nesting Search Within Tag? (1997) taxTotal (1997) Image Upload and Auto Resize? (2003) [text] variable assignment within [search] context (2000) Emailer setup (1997) Affiliate Program code (2000) Error Lob.db records error message not name (1997) NT Version on IIS 4.0 (1997) Date Formats (1997)