Re: Declarative constraints in practical terms
Date: Mon, 27 Feb 2006 17:09:34 +0200
"x" <x_at_not-exists.org> wrote in message news:dtv3n7$oi8$1_at_emma.aioe.org...
> max([H|T],H):-max(T,N), H>=N.
> max([H|T],M,R):-H<M, max(T,M,R).
> max([H|T],M,R):-H>=M, max(T,H,R).
We can also say the above statements are imperative statements because they
state requirements :-)
By this logic we could say that the languages who are not imperative are the ones with optional statements. :-)
In other words one can delete all the statements and the program still do what it was supposed to do. :-) Received on Mon Feb 27 2006 - 16:09:34 CET