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, KishReceived on Mon Aug 27 2007 - 06:41:37 CEST
This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET