Re: [WebDNA] improvements
This WebDNA talk-list message is from 2015
It keeps the original formatting.
numero = 111912
interpreted = N
texte = Yep =97>On Jan 15, 2015, at 11:58 AM, iPhonzie@G
wrote:> [elseif] would be a great addition for situations where you have a =number of mutually exclusive conditions that are to complex for =[switch]. I have lots of code that looks like this:>=20> [if (condition1)]> [then]> do stuff 1> [/then]> [else]> [if (condition2)]> [then]> do stuff 2> [/then]> [else]> [if (condition3)]> [then]> do stuff 3> [/then]> [else]> do default stuff> [/else]> [/if]> [/else]> [/if]> [/else]> [/if]>=20> This would be much nicer if I could write:>=20> [if (condition1)]> [then]> do stuff 1> [/then]> [elseif (condition2)]> do stuff 2> [/elseif]> [elseif (condition3)]> do stuff 3> [/elseif]> [else]> do default stuff> [/else]> [/if]>=20>=20> This could similarly be addressed with an alternative form of =switch/case. One possibility would be if no parameters are in the =[switch] tag, then [if]-style comparisons could be put into each [case] =tag:>=20> [switch]> [case (condition1)]> do stuff 1> [/case]> [case (condition2)]> do stuff 2> [/case]> [case (condition3)]> do stuff 3> [/case]> [default]> do default stuff> [/default]> [/switch]
Associated Messages, from the most recent to the oldest:
Yep =97>On Jan 15, 2015, at 11:58 AM, iPhonzie@G wrote:> [elseif] would be a great addition for situations where you have a =number of mutually exclusive conditions that are to complex for =[switch]. I have lots of code that looks like this:>=20> [if (condition1)]> [then]> do stuff 1> [/then]> [else]> [if (condition2)]> [then]> do stuff 2> [/then]> [else]> [if (condition3)]> [then]> do stuff 3> [/then]> [else]> do default stuff> [/else]> [/if]> [/else]> [/if]> [/else]> [/if]>=20> This would be much nicer if I could write:>=20> [if (condition1)]> [then]> do stuff 1> [/then]> [elseif (condition2)]> do stuff 2> [/elseif]> [elseif (condition3)]> do stuff 3> [/elseif]> [else]> do default stuff> [/else]> [/if]>=20>=20> This could similarly be addressed with an alternative form of =switch/case. One possibility would be if no parameters are in the =[switch] tag, then [if]-style comparisons could be put into each [case] =tag:>=20> [switch]> [case (condition1)]> do stuff 1> [/case]> [case (condition2)]> do stuff 2> [/case]> [case (condition3)]> do stuff 3> [/case]> [default]> do default stuff> [/default]> [/switch]
Donovan Brooke
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:
Math (1997)
[searchString] (1997)
RE: New WebCatalog Version !!! (1997)
Attn: Bug in GeneralStore example b15 (1997)
California Tax Rates (1998)
[WebDNA] help getting developer code please (2017)
Server Freeze (1998)
WC 4.0 and WebStar 4.1 on Mac OS (2000)
showif and cart (1997)
Inventory Debit Procedure (1998)
Re1000001: Setting up shop (1997)
[shownext] and sort (1998)
checksum for credit cards? (1997)
'RequiredField' Question (1998)
Upgrading old WebCat Database Files (1997)
WYSIWYG HTML editor for use in browser (2001)
Nesting WebDNA in JavaScript (2003)
[WebDNA] Downloadable docs (2011)
Draft Manual, Tutorial, and more (1997)
EIMS Problems (1997)