Share » Forums » General » Can't override my variable

Can't override my variable

Can't override my variable

Monday 02 January 2006 3:51:25 am - 1 reply

Modified on Monday 02 January 2006 3:56:01 am by Philip K.

Author Message

Philip K.

Monday 02 January 2006 9:07:13 am

OK, I found the Problem - or a Bug.....?!

I used the following code:

{def $str=""}

{switch name=myname match=$node.node_id}
  {case in=array('xx','xx','xx')}
    
    do this

  {/case}
  {case}

    {set $str=$str|append("myvalue")}

  {/case}
{/switch}

and whenever I tried to change die value of $str nothing happened. Later I tried anything to find a mistake in my code an the mistake was, that I mustn't give a name to the "Switch".

Now I have this code:

{def $str=""}

{switch match=$node.node_id}
  {case in=array('xx','xx','xx')}
    
    do this

  {/case}
  {case}

    {set $str=$str|append("myvalue")}

  {/case}
{/switch}

and it works fine :)

But isn't it a bug?? I don't know...

Linux is like a wigwam; no windows, now gates, and apache inside!

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu