Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help in lists for grammar

Status
Not open for further replies.

alhobarata

Programmer
May 31, 2008
1
This code make transformation of number to text and vice versa
%----------------------------------
dx(X)-->cm(X);c(X);d(X).
cm([DDD,mil])-->c(DDD),[0,0,0].
c([cento,e|DD])-->[1],d(DD).
d([dez])-->[1,0].
%----------------------------------

Test with:
?- dx(C,[1,1,0,0,0,0],[]).
The answer is:
C = [[cento, e, dez], mil]

I want the answer become:
C = [cento, e, dez, mil]

thanks in advance.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top