j
k
j a
j l
?- atom_codes('2002', [_,_|_L]), atom_codes(Result, _L). Result = '02' ?
?- atom_codes('2002', [_,_|_L]), atom_codes(Result, _L).
Result = '02' ?
That is the traditional way, but you can make it more concisely:
?- Year = '2002', sub_atom(Year, 2, 2, YY).
YY = '02', Year = '2002' ?
((+)
Back to the thread
Back to the list