Title: RE: Interpolation

Gosh, I LOVE HTML mail!  Now I understand why MSFT doesn't give you a choice!

(just kidding.  Sorry jon.)


    On Tue, 28 Nov 2000 14:14:40 +0200, Fedor wrote:

    >  > >    #set $ivm = "#{$mac}()"
    >  > >    $ivm
    >  > >
    >  >
    >  > That was discussed briefly and rejected as downright *too* scary.
    >  > Starting to smell like Perl or something :)
    >  >
    >  > >  #set $f = "${$a}.{$b}()"
    >  > >  $f
    >  > >
    >  > > Will this call the function $foo.bar ?
    >  >
    >  > Same thing - alas no.
    >  >
    >  > But you did get me thinking - Is this really a desireable feature to
    >  > have?
    >  >
    >  > geir


    >  In pure velocity context you maybe don't what or need this. But once
    >  you start to throw xml into the picture its not scary at all, well
    >  maybe some small pieces you can hide somewhere.

    >  Just set a scary property to a value you what/need. That can replace
    >  all the other optional flags.

    >  Theo

    Not that I'm trying to scare you, but...

    what would this do then?:

    #set $foo="\$bar"
    #set $bar="$foo"

Well, I can't try it here, but I would guess :

after the first set, $foo -> interpolated "\$bar" which is "$bar"  (the literal)

after the second #set, $bar  -> interpolated "$foo" -> "$bar" (the literal)

so if you then output $bar, you would get '$bar' in the output (minus the single quotes)

Try it... let us know.  All the code is in CVS.  Might have made the nightly tarball, might not.  Can't recall.





Reply via email to