On Fri, 21 Sep 2012, Logan Kelly wrote:
> Would something like this work?
>
> matrix X
> loop i=1..5 -q
> loop m = i+1..5 -q
> #Do stuff
> endloop
> endloop
As far as I'm correct in imagining what your intentions are (having a
nested loop in which the extremes of the inner loop depend on the counting
variable of the outer loop), yes, as demonstrated by the following
snippet:
<hansl>
loop i=1..5 -q
loop m = i+1..5 -q
printf "%d, %d\n", i, m
endloop
endloop
</hansl>
But, out of curiosity, wouldn't have taken you much less to try this by
yourself rather than asking the list? Note: it's good that you posted the
question to the list, so it automatically enters the realm of Google's
omniscience and others will find it in the future. I'm just asking.
--------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti@univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
--------------------------------------------------