Re: [9fans] Local variables and rc functions
  Home FAQ Contact Sign in
comp.os.plan9 only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: [9fans] Local variables and rc functions         

Group: comp.os.plan9 · Group Profile
Author: kazumi iwane
Date: Aug 14, 2008 04:25

if you want to delay the expansion of an env var until fn invocation,,use eval.

%% fn foo {eval echo $$bar}

On 8/14/08, roger peppe gmail.com> wrote:
> looks like a bug to me; after all:
>
> %% bar=baz {echo $bar}
> baz
> %%
>
> i'm somewhat surprised this hasn't been fixed years ago.
>
> On Wed, Aug 13, 2008 at 10:27 PM, Micah Stetson stetsonnet.org>
> wrote:
>> Is this a bug?
>>
>> %% fn foo { echo $bar }
>> %% bar=baz foo
>>
>> %%
>>
>> I would expect to see baz instead of a blank line.
>>
>> Micah
2 Comments
diggit! del.icio.us! reddit!

RELATED THREADS
SubjectArticles qty Group
Hypergeometric functions and beta functionssci.math ·
NB question on global/local variables in functionscomp.lang.python ·