Re: math formula substitution and evaluation



On Sun, Jul 16, 2006 at 05:48:10AM -0400, Daniel D Jones wrote:

It certainly does help. I thought about substitution but couldn't
come up with a syntax. This seems to be exactly what I was looking
for, but I'm running into a problem. Here's code which demonstrates
it:

[ ... ]

As you can see, the @values array is being shuffled to generate the
perms correctly. However, the substitution seems to always be using
the original, unshuffled values. Is it being cached somehow or what?

Try printing out @tests when you print out @values.

When you iterate through @tests, $test is an alias to the array elements
rather than a copy of them. So altering $test is changing @tests. This
is what you are seeing.

--
Paul Johnson - paul@xxxxxxxx
http://www.pjcj.net
.



Relevant Pages

  • Re: math formula substitution and evaluation
    ... On Sunday 16 July 2006 07:26, Paul Johnson wrote: ... come up with a syntax. ... $test is an alias to the array elements ...
    (perl.beginners)
  • Re: Access doesnt like its own SQL
    ... I guess Access' thing is like the 'AS DerivedTable' syntax ... replace the opening bracket and closing ... your own alias name. ... FROM [SELECT KitItem ...
    (microsoft.public.access.modulesdaovba)
  • Re: group by
    ... I'll have to study up some more on the 'ON' and 'AS' syntax. ... The AS is optional and is only for defining an alias for the derived ... The alias is always mandatory, ... Jeff Kish ...
    (comp.databases.ms-sqlserver)
  • Re: E2K7 PF Add email alias
    ... Found the issue to be syntax. ... When using Set-MailPublicFolder I used ... where I should actually have been using the alias. ...
    (microsoft.public.exchange.admin)
  • Re: 9i: Check- constraint Upper(Column)
    ... the brackets are *not* optional. ... So it sounds to me as *alias* is a nice word for a bug. ... the table is referenced in the index definition (but I have ... An error 'missing brackets' is not appropriate here, for the syntax is ...
    (comp.databases.oracle.misc)