Re: [eclipse-users] undefined variable attribute

From: Joachim Schimpf (Independent Contractor) <"Joachim>
Date: Mon, 03 Sep 2007 14:14:08 +0100
Malcolm Ryan wrote:
> I'm getting an "undefined variable attribute" error from suspend/3 in  
> the code:
> 
> :- module(bar).
> 
> :- meta_attribute(attribute_name, []).
> :- export init/1.
> :- export struct(structure(susplist)).
> 
> init(V) :-
> 	Attr = structure{},
> 	add_attribute(V, Attr, attribute_name),	
> 	init_suspension_list(susplist of structure, Attr),
> 	suspend(true, 4, V->bar:(susplist of structure)).
> 	
> What is wrong here?


This should be
suspend(true, 4, V->attribute_name:(susplist of structure)).

Sorry for the confusion - I see the Manual is misleading here.
This is because by convention all Eclipse libraries follow the
convention "one module - one attribute" and use the module name
as the attribute name.


-- Joachim
Received on Mon Sep 03 2007 - 14:14:23 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST