tcl-mod_dtcl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "yahalom emet" <yaha...@zvia.org.il>
Subject Re: terminating script
Date Thu, 17 Jan 2002 11:30:55 GMT
the problem with this solution is again the internal procs. In my case I
have a proc that handles errors. whenever an error happend I go to that proc
and I want this proc to terminate the script(so I do not need to write
return after I call this procedure). of course return in this procedure will
just return and continue with the bigProc. anyway I will use this solution
as there is no better one.
maybe add this to the wish list :-)
if I am talking about a wish list can there be a support for sessions. I
want to keep asession for each user so I can handle things better( this
thing are available in microsoft ASP and java JSP). I use mod_dtcl for xml
generation so keeping sessions is more important as I need to keep data in
between sessions.




Thanks

Yahalom Emet
Software Developer
Xor Technologies Ltd.

Tel: +972 (0)4-6619164
E-mail: yahalom@zvia.org.il
Web: http://www.xortechnologies.com


----- Original Message -----
From: "David N. Welton" <davidw@dedasys.com>
To: "yahalom emet" <yahalom@zvia.org.il>
Sent: Thursday, January 17, 2002 1:23 PM
Subject: Re: terminating script


> "yahalom emet" <yahalom@zvia.org.il> writes:
>
> > the foreach is better but it has a problem. If I put the break in a
> > proc, I get an error.  anyway I will use it (I will have to add 10
> > breaks instead of 1 in a proc:-)
>
> What I meant with a proc is that you could just wrap all your code in
> a proc:
>
> <?
>
> blah
>
> blah blah
>
> blah {
>         blah blah
>         blah
>         foo
>         bar
> }
>
> foo bar
>
> ?>
>
> Becomes:
>
> <?
>
> proc BigProc { } {
>         blah
>         blah blah
>
> ....
>
> }
>
> BigProc
>
> and then from inside the proc, just call regular old Return.
>
> Remember also that bits of HTML are really just hputs statements, so
> they can go inside the proc too.
>
> --
> David N. Welton
>    Consulting: http://www.dedasys.com/
> Free Software: http://people.debian.org/~davidw/
>    Apache Tcl: http://tcl.apache.org/
>      Personal: http://www.efn.org/~davidw/


Mime
View raw message