Re: [eclipse-clp-users] accessing an undefined variable does not throw an error

From: Joachim Schimpf <joachim.schimpf_at_...44...>
Date: Sun, 05 Apr 2009 23:20:28 +1000
Ulrich Scholz wrote:
> Hello, accessing an undefined variable with, e.g., setval is supposed to
> throw an error (41).  But it does not.
> 
> Best regards,
> 
> Ulrich
> 
> scholz_at_...175...:£ eclipse
> ECLiPSe Constraint Logic Programming System [kernel]
> Kernel and basic libraries copyright Cisco Systems, Inc.
> and subject to the Cisco-style Mozilla Public Licence 1.1
> (see legal¢mpl.txt or www.eclipse-clp.org/licence)
> Source available at www.sourceforge.org/projectsęclipse-clp
> GMP library copyright Free Software Foundation, see legal/lgpl.txt
> For other libraries see their individual copyright notices
> Version 6.0 #42 (i386_linux), Wed Sep 24 01:37 2008
> [eclipse 1]: setval(a,0).
> 
> Yes (0.00s cpu)
> [eclipse 2]:

The reference page says "If there was no variable visible from the
caller module, a local non-logical variable is created and its value
is set."  That's what happens.  Actually, the event 41 is indeed
raised, but the handler repairs the situation by creating the variable.

Please send bug reports to eclipse-clp-bugs_at_lists.sourceforge.net
or, better, enter them directly into the bug tracking system at
http://eclipse-clp.org/eclipse/bugzilla


-- Joachim
Received on Sun Apr 05 2009 - 13:20:48 CEST

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