I was going to ask for [3wishes] tag, but there is =that whole issue of wishing for more wishes and whatnot, and endless loops =are always a danger.---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: suppo=rt@webdna.us---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: suppo=rt@webdna.usSo=unds like we just need the [readMyMind] and [doMyWorkForMe] tags and we'=;ll be all set.-Dan StrongOn Thu, Jan 15, 2015 at 11:50 AM, Donovan Br=ooke <dbrooke@euca.us> wrote:Yep=C2=A0 =E2=80=94>
On Jan 15, 2015, at 11:58 AM, iPhonzie@G <iphonzie@gmail.com> wrote:
> [elseif] would be a great addition for situations where you have a num=ber of mutually exclusive conditions that are to complex for [switch]. I ha=ve lots of code that looks like this:
>
> [if (condition1)]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[then]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0do stuff 1
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[/then]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[else]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[if (condition2)=]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ==C2=A0 =C2=A0[then]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ==C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0do stuff 2
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ==C2=A0 =C2=A0[/then]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =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=A0 =C2=A0 =C2=A0 ==C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[/else=]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ==C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[/if]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ==C2=A0 =C2=A0[/else]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[/if]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[/else]
> [/if]
>
> This would be much nicer if I could write:
>
> [if (condition1)]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[then]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0do stuff 1
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[/then]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[elseif (condition2)]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0do stuff 2
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[/elseif]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[elseif (condition3)]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0do stuff 3
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[/elseif]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[else]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0do default stuff=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[/else]
> [/if]
>
>
> This could similarly be addressed with an alternative form of switch/c=ase. One possibility would be if no parameters are in the [switch] tag, the=n [if]-style comparisons could be put into each [case] tag:
>
> [switch]
> [case (condition1)]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0do stuff 1
> [/case]
> [case (condition2)]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0do stuff 2
> [/case]
> [case (condition3)]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0do stuff 3
> [/case]
> [default]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0do default stuff
> [/default]
> [/switch]-----------------------------------------------------=----
This message is sent to you because you are subscribed to
the mailing list <ta=lk@webdna.us>.
To unsubscribe, E-mail to: <talk-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
Bug Reporting: suppo=rt@webdna.us
|
I was going to ask for [3wishes] tag, but there is =that whole issue of wishing for more wishes and whatnot, and endless loops =are always a danger.---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: suppo=rt@webdna.us---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: suppo=rt@webdna.usSo=unds like we just need the [readMyMind] and [doMyWorkForMe] tags and we'=;ll be all set.-Dan StrongOn Thu, Jan 15, 2015 at 11:50 AM, Donovan Br=ooke <dbrooke@euca.us> wrote:Yep=C2=A0 =E2=80=94>
On Jan 15, 2015, at 11:58 AM, iPhonzie@G <iphonzie@gmail.com> wrote:
> [elseif] would be a great addition for situations where you have a num=ber of mutually exclusive conditions that are to complex for [switch]. I ha=ve lots of code that looks like this:
>
> [if (condition1)]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[then]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0do stuff 1
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[/then]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[else]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0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=A0 =C2=A0 =C2=A0[/elseif]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[elseif (condition3)]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0do stuff 3
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[/elseif]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[else]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0do default stuff=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0[/else]
> [/if]
>
>
> This could similarly be addressed with an alternative form of switch/c=ase. One possibility would be if no parameters are in the [switch] tag, the=n [if]-style comparisons could be put into each [case] tag:
>
> [switch]
> [case (condition1)]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0do stuff 1
> [/case]
> [case (condition2)]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0do stuff 2
> [/case]
> [case (condition3)]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0do stuff 3
> [/case]
> [default]
>=C2=A0 =C2=A0 =C2=A0 =C2=A0do default stuff
> [/default]
> [/switch]-----------------------------------------------------=----
This message is sent to you because you are subscribed to
the mailing list <ta=lk@webdna.us>.
To unsubscribe, E-mail to: <talk-leave@webdna.us>
archives: http://mail.webdna.us/list/talk@webdna.us
Bug Reporting: suppo=rt@webdna.us
DOWNLOAD WEBDNA NOW!
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...