RE: How Embperl sub routine retun value?

1999-12-16 Thread Albert Liu
> >Read about how Perl passes parameters :-) > >You shift the value of your parameter into $bb, now you modifiy $bb, but $bb >is a variable of it's own, it has nothing to do with the parameter you pass. >Reread my example and write your sub like this: > >[$ sub TTEST $] >[- $aa = 3; -] >$

RE: How Embperl sub routine retun value?

1999-12-11 Thread Albert Liu
Hi Gerald, Thanks, it works, but the sub routine has to be in same files. How about the sub routine is "Execute" from external lib file? I test it, it doesn't work, do you know how to pass value between sub routines they are not in same file? Regards, Albert At 08:47 AM 12/10/99 +0100, Gerald

How Embperl sub routine retun value?

1999-12-09 Thread Albert Liu
Hi, Does anyone know how to return or pass a value inside Embperl sub routine? Like [$ sub TTEST $] [- $aa = 2; $aa is [+$aa+] [- return $aa; -] [$ endsub $] [- $bb = TTEST(); -] $bb is [+$bb+] The result is $aa is 2 $bb is 0 What is wrong? Thanks Albert