Re: [eclipse-users] term_string

From: Kish Shen <kisshen_at_...5...>
Date: Mon, 27 Aug 2007 06:41:10 +0100
Malcolm Ryan wrote:
>
> Is there any way to specifically set these debug names for variables?  
> It would help in CSPs with many variables, like:
>
> (for(I, 1, 10),
>   foreach(Vi, Variables),
>   param(Domain)
> do
> 	Vi :: Domain
> )
>
> to be able to give the names V1, ..., V10 to the Vi variables, if  
> only for debug purposes.
>
>   
Yes, you can use lib(var_name), and specifically the predicates 
set_var_name/2,3. For your example,
you can set the names with:

:- lib(var_name).
....
     set_var_name(Variables, 'V', 1),
     .....

this would number the variables inside Variables as V#1, V#2, ... etc.

Cheers,

Kish
Received on Mon Aug 27 2007 - 06:41:37 CEST

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