Re: [WebDNA] for a rainy day.. if ever/when the hood is up again on the [function]/[return] code

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 107502
interpreted = N
texte = >> Feature request: >>=20 >> correct me if I am wrong, but it would be more modern if parsing = would drop out of the [function] (with the [return] val.) whenever = [return] was hit. I.e. it should be allowed to have many [return]'s = inside conditionals.. inside the function... so we can just up and = decide to jump out of the function with the return val at that point. >=20 >=20 > The functionality of not breaking out of the function context when = hitting a [return][/return] was by design.. this was so people can = sculpt returns... ie., string of variables... >=20 > ----------------------- > [function ..] > [return]f_string=3D[/return] > [showif blah=3D] > [return]&f_something=3D[/return] > [/showif] > [showif otherblah=3D] > [return]&f_other=3D[/return] > [/showif] > [/function] > ---- >=20 > [f_string] > [f_something] > [f_other] > ---------------------- >=20 > sure, the above could be done other ways.. but the functionality adds = some useful properties in my opinion. >=20 > Donovan Hi Donovan,=20 Thanks for pointing that out. So now I see it is a (useful) feature, = and not just weird. I will have to approach Webdna [return] differently = than I have been to make use of it like that. Anyway good to know. =20 Funny how in Webdna [return] does not break out, but a case (in switch) = will, ...while in PHP return breaks out, while a case (in switch) will = not (without explicit "break"). =20 -G Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] for a rainy day.. if ever/when the hood is up again on the [function]/[return] code (Govinda 2011)
  2. Re: [WebDNA] for a rainy day.. if ever/when the hood is up again on the [function]/[return] code (Govinda 2011)
  3. [WebDNA] for a rainy day.. if ever/when the hood is up again on the [function]/[return] code (Govinda 2011)
>> Feature request: >>=20 >> correct me if I am wrong, but it would be more modern if parsing = would drop out of the [function] (with the [return] val.) whenever = [return] was hit. I.e. it should be allowed to have many [return]'s = inside conditionals.. inside the function... so we can just up and = decide to jump out of the function with the return val at that point. >=20 >=20 > The functionality of not breaking out of the function context when = hitting a [return][/return] was by design.. this was so people can = sculpt returns... ie., string of variables... >=20 > ----------------------- > [function ..] > [return]f_string=3D[/return] > [showif blah=3D] > [return]&f_something=3D[/return] > [/showif] > [showif otherblah=3D] > [return]&f_other=3D[/return] > [/showif] > [/function] > ---- >=20 > [f_string] > [f_something] > [f_other] > ---------------------- >=20 > sure, the above could be done other ways.. but the functionality adds = some useful properties in my opinion. >=20 > Donovan Hi Donovan,=20 Thanks for pointing that out. So now I see it is a (useful) feature, = and not just weird. I will have to approach Webdna [return] differently = than I have been to make use of it like that. Anyway good to know. =20 Funny how in Webdna [return] does not break out, but a case (in switch) = will, ...while in PHP return breaks out, while a case (in switch) will = not (without explicit "break"). =20 -G Govinda

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:

Hummm .... (1998) Format of Required fields error message (1997) Enhanced Master Counter? (1997) [index] (1997) Secure Server (1997) # of real domains on 1 web server (1997) WebCat2b15MacPlugin - showing [math] (1997) Sorting by date (1997) Pirated WebCat? NOT... (2003) Help! WebCat2 bug (1997) PIXO Support (1997) How To get Some Help (2003) no template caching (1997) bug in [SendMail] (1997) [Cart] ... (1997) [OT] HTML EMAIL program wanted (1999) Stop the madness. (1997) japanese characters (1997) Multi-processor Mac info ... (1997) Ooops-Serial Number for NT (1997)