ECLiPSe with nested loops

From: Rory (rpd100_at__REMOVETHIS_york.ac.uk)
Date: 01/05/04


Date: Mon, 05 Jan 2004 22:16:24 +0000

Can someone explain why this doesn't work when you remove the comment??

%-------------------------------------
test(Z):-
         X=1,Y=2,
         (
                 for(I, 1, 3),
                 param(X,Y,Z)
         do
                 (
                         for(J, 1, 4) ,
                         param(I,X,Y,Z)
                 do
                         (
                                 for(K, 1, 5),
                                 param(I,J,X,Y,Z)
                         do
                                 (
             %% append(X,Y,Z),
                                         printf("I=%w, J=%w, K=%w, X=%w,
Y=%w%n", [I,J,K,X,Y])
                                 )
                         )
                 )
         ).

%-------------------------------------

It breaks out of all loops upon executing the first line on the
innermost loop. Why? does "append(X,Y,Z)" evaluate to false? if so why?
Or more practically how does one iterate over a number of variables?

Any ideas people?

-Rory



Relevant Pages

  • Re: How can i simplify this messy for loop???!!!
    ... > certain columns of my H matrix to zero. ... independent for loops, not one nested set. ... % once for each value of col_1 (you are executing it thousands ... I left it as col_1, col_2, etc. for readability. ...
    (comp.soft-sys.matlab)
  • Re: Do Loop until empty row (column "A")
    ... appears the loops is not executing with the following code. ... Jim ... Dim rng As Range, i As Long ...
    (microsoft.public.excel.programming)
  • RE: Refer to Column with a variable
    ... The A1 notation does not seem to be conducive to this, ... I'm creating a macro that will create a data sheet for me. ... I have loops that iterate through the columns and rows to set up my ...
    (microsoft.public.excel.programming)
  • Re: [PATCH 2/2] page table iterators
    ... we basically have that bunch of loops that all do the same thing ... to iterate the page tables. ... and 3 level page tables easily, regaining some of the perfs lost by the ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: bash/sh shell scripts and line-based list expansion
    ... is there a way in bash/sh to get for loops to iterate a single line at a ... rather than a single word? ... stuff with word1 ... ...
    (comp.os.linux.setup)