I have a lot of experience with languages such as C or Pascal. I am
beginning to learn prolog (SWI Prolog) and I have a doubt: other languages
have several repetition structures like Repeat, While, For and prolog
haven't. How can we implement by example a For cycle with prolog?
Thank you for your help
Rui Silva
that's not the usual way to think about prolog (think in term of recursion)
but one could implement a for loop like this
Re: In which cases/problems is Prolog faster than Java? ... We've OOP languages built from functional languages foundations ... they are envy of imperative programming styles.... still a predicate either in plain Prolog or encapsulated in a Prolog ... People often use Java not because its OO features per se but because ... (comp.lang.prolog)
Re: Is Prolog good for AI? (was: Minsky still posting) ... > than a programming language suitable for large scale direct human use. ... but it was Prolog nor AI. ... >> than most other languages....PHP because it solves a very specific problem. ... (comp.lang.prolog)
Re: Mainstreaming Prolog a Pragmatic Approach? ... > striking feature of Prolog....languages with pointers into structures. ... Japanese Fifth Generation project's adoption of the logic programming... Another part of the problem is recursion.... (comp.lang.prolog)
Re: Lisp/AI, Carnegie Mellon University ... > I tend to feel the same way about prolog, but people who are very fluent ... I guess it may be partly because Lisp has a core that can be ... > used for a functional programming style, somewhat like Scheme, which is ... > of what theoretical computer scientists call 'functional languages',... (comp.lang.lisp)
Re: help about AI ... You will need to branch out on languages beyond C++. ... I have used Prolog and Common ... delivery systems and I haven't heard much about Common Lisp keeping up ...hard problem that has never had a reasonable solution. ... (comp.ai)