fix $VAR handling.
This commit is contained in:
parent
ad603a53ed
commit
759ce13bbf
@ -748,6 +748,13 @@ p_float_format( USES_REGS1 )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static Int
|
||||
p_dollar_var( USE_REGS1 )
|
||||
{
|
||||
Term tv = Yap_MkApplTerm(LOCAL_FunctorVar, 1, &ARG1);
|
||||
return Yap_unify(tv, ARG2);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Yap_InitWriteTPreds(void)
|
||||
@ -765,6 +772,8 @@ Yap_InitWriteTPreds(void)
|
||||
Yap_InitCPred ("print", 1, print1, SyncPredFlag);
|
||||
Yap_InitCPred ("print", 2, print, SyncPredFlag);
|
||||
Yap_InitCPred ("write_depth", 3, p_write_depth, SafePredFlag|SyncPredFlag);
|
||||
;
|
||||
Yap_InitCPred ("$VAR", 2, p_dollar_var, SafePredFlag);
|
||||
;
|
||||
Yap_InitCPred ("$float_format", 1, p_float_format, SafePredFlag|SyncPredFlag);
|
||||
}
|
||||
|
@ -1083,10 +1083,11 @@ number of steps.
|
||||
'$name_well_known_vars'(NVL0).
|
||||
|
||||
'$name_vars_in_goals1'([], I, I).
|
||||
'$name_vars_in_goals1'(['$VAR'(Name)|NGVL], I0, IF) :-
|
||||
'$name_vars_in_goals1'([SName|NGVL], I0, IF) :-
|
||||
I is I0+1,
|
||||
'$gen_name_string'(I0,[],SName), !,
|
||||
atom_codes(Name, [95|SName]),
|
||||
'$VAR'(Name, SName ),
|
||||
'$name_vars_in_goals1'(NGVL, I, IF).
|
||||
'$name_vars_in_goals1'([NV|NGVL], I0, IF) :-
|
||||
nonvar(NV),
|
||||
|
Reference in New Issue
Block a user