perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kjell Morgenstern <morgenstern-kj...@berlinwebmail.de>
Subject Re: [$ return ... $]
Date Sun, 29 Sep 2002 10:07:04 GMT
Am Samstag, 28. September 2002 20:10 schrieb Ed Grimm:

> Because [- exit -] does the same thing?
> > Why is there no [$ return $] ?

What I intended was more like

[$ sub Example $]
  [$ var data $]
  [- $data = shift 
     $data = DoSomeThingWith($data); -]

  [$ if (not($data)) $] [$ return ("Oups!"); $] [$ endif $]
   Some HTML...
   [+ $data +] 

  [$ return $data; $]
[$ endsub $]

Of course there are many other ways to do this (eg calling 
DoSomeThingWith($data) first, and then Example($data) ), but I think using 
return would be more intuitive.

mfG,
  Kjell Morgenstern

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message