Re: Need help to write routine - Please

new topic     » goto parent     » topic index » view thread      » older message » newer message

Pete wrote:

> On Fri, 29 Aug 2003 17:54:41 +0200, Juergen Luethje <j.lue at gmx.de>
> wrote:

<snip>

>> for i = 1 to power(length(newValues[1]),length(positions)) do
>
> No, that's not as flexible on the iterative (my) side:

Oh, sorry. I didn't completely understand your code.

> You need
>
> integer maxser
> maxser=1
> for i=1 to length(newValues) do
> 	maxser*=length(newValues[i])
> end for
> for i=1 to maxser do
>
> Just in case any of length(newValues[x]) are not the same.
> The recursive code (yours) takes that case in its stride.
> ..Just dotting the i's
>
> Pete

I see now, thanks.

Regards,
   Juergen

-- 
 /"\  ASCII ribbon campain  |    |\      _,,,---,,_
 \ /  against HTML in       |    /,`.-'`'    -.  ;-;;,_
  X   e-mail and news,      |   |,4-  ) )-,_..;\ (  `'-'
 / \  and unneeded MIME     |  '---''(_/--'  `-'\_)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu