Re: [eclipse-clp-users] Syntax error in source transformation

From: Joachim Schimpf (Independent Contractor) <jschimpf_at_cisco.com>
Date: Tue, 15 Apr 2008 11:04:10 +0100
Valerio Guarnieri wrote:
> Unfortunately I am not familiar with structure in ECLiPSe, so could
> you please show me how I can wrap all the params into a structure?
> I made some tries but none of them was successful.
> In particular I would be interested in how you can declare such a
> structure and how you should refer to single fields wrapped inside it
> within the for loop.
> I do not need detailed code, a simple example (referring to the
> example I wrote in the previous post) would be enough.

The code I posted earlier _was_ the concrete code (apart from
the ... of course, which stand for bits of your original code):

Joachim Schimpf (Independent Contractor) wrote:
>> (for(I,1,T1), param( IN1, IN2, OUT1, OUT2, REG, A, B, C, A_F, B_F,
>> C_F, OUT1_F, OUT2_F, REG_F, E1, E2, E3, E4, E5, E6, E7, E1_F, E2_F,
>> E3_F, E4_F, E5_F, E6_F, E7_F ) do
> 
> In this case you can simply wrap all the params into a structure, e.g.
> 
> ( for(I,1,T1), param(aux(IN1, IN2, ..., E7_F)) do
>      ...
> )
> 
> or, slightly more efficient in the current implementation:
> 
> Params = aux(IN1, IN2, ..., E7_F),
> ( for(I,1,T1), param(Params) do
>      Params = aux(IN1, IN2, ..., E7_F),
>      ...
> )


Cheers,
Joachim
Received on Tue Apr 15 2008 - 03:04:27 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET