Am 15.11.2012 19:44, schrieb Allin Cottrell:
> On Thu, 15 Nov 2012, Pindar wrote:
>
>> And in terms of 'the loop line' string-substitution generates also an error:
>> (my challenge solution of the interaction stuff)
> True, up till now $-string substitution has not been available
> in the line that starts a loop. This is now relaxed. In
> current CVS both of the following should work OK, regardless
> of the language in which gretl is running:
That's nice!

Cheers
Leon
>
> <hansl>
> # Using numerical values
> loop i=1..4 -q
>     printf "i=%d\n", i
>     loop j=i+1..i+2 -q
>       printf "  j=%d\n", j
>     endloop
> endloop
>
> # Using string substitution
> loop i=1..4 -q
>     printf "i=$i\n"
>     loop j=$i+1..$i+2 -q
>       printf "  j=$j\n"
>     endloop
> endloop
> </hansl>
>
> Allin Cottrell
> _______________________________________________
> Gretl-users mailing list
> Gretl-users(a)lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users

Am 15.11.2012 19:44, schrieb Allin Cottrell:
On Thu, 15 Nov 2012, Pindar wrote:

And in terms of 'the loop line' string-substitution generates also an error:
(my challenge solution of the interaction stuff)
True, up till now $-string substitution has not been available 
in the line that starts a loop. This is now relaxed. In 
current CVS both of the following should work OK, regardless 
of the language in which gretl is running:
That's nice!

Cheers
Leon

<hansl>
# Using numerical values
loop i=1..4 -q
   printf "i=%d\n", i
   loop j=i+1..i+2 -q
     printf "  j=%d\n", j
   endloop
endloop

# Using string substitution
loop i=1..4 -q
   printf "i=$i\n"
   loop j=$i+1..$i+2 -q
     printf "  j=$j\n"
   endloop
endloop
</hansl>

Allin Cottrell
_______________________________________________
Gretl-users mailing list
gretl-us...@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users

Reply via email to