Turbo Prolog is a very fast old Prolog system that only works with MS-DOS. It does not comply with the Edinborough Standard.
Questions tagged [turbo-prolog]
41 questions
1
vote
2 answers
search all paths and the shortest path for a graph - Prolog
I have a problem in my code with turbo prolog which searches all paths and the shortest path in a graph between 2 nodes.
The problem that i have is to test if the node is in the list or not (exactly in the clause of member)
1 ---- b…
user307320
1
vote
1 answer
prolog get syntax error when increase stack size
Trying to solve the puzzle task with prolog and got some problems.
1002 Stack Overflow. Re-configure with Setup if necessary.
So, I've tried to increase stack size in setup and run program again.
But it causes the other error: Syntax error on…

Anastasia S
- 149
- 2
- 13
1
vote
1 answer
Arrangements of elements of a list in prolog
domains
el=integer
list = el*
lista = list*
predicates
aux(list,integer,list)
arrangements(list,integer,lista)
clauses
aux([H|_],1,[H]).
aux([_|L],N,L1):-
aux(L,N,L1).
aux([H|L],N,[H|L1]):-
…

user3043278
- 174
- 1
- 3
- 15
1
vote
1 answer
Other implementation of x at power n in Prolog
Hi does anyone know other implementation to compute X at power N in Prolog beside this one:
predicates
power(real, integer, real)
clauses
power(_,0,1).
power(X,N,R):-
N<0,
N1 = -N,
X1 = 1/X,
…

user3043278
- 174
- 1
- 3
- 15
1
vote
1 answer
Trying to learn Prolog, can't figure out what's wrong
Doing a small example, I want to insert a symbol within a list at a certain pozition
domains
element = symbol
list = element*
position = integer
predicates
insert (element, position, list, list)…

Kalec
- 2,681
- 9
- 30
- 49
0
votes
3 answers
Getting errors with prolog program
global facts
xpositive(symbol,symbol)
xnegative(symbol,symbol)
predicates
animal_is(symbol) - nondeterm (o)
it_is(symbol) - nondeterm (i)
ask(symbol,symbol,symbol) - determ (i,i,i)
remember(symbol,symbol,symbol) - determ (i,i,i)
…

daemon54
- 1,057
- 3
- 16
- 36
0
votes
2 answers
GUI for a Turbo Prolog application
I have an university assignment where my goal is to create a GUI for an expert system created in Turbo Prolog. Is there any common way to do this? Or is there a way that, for example, a Java application can call the Prolog application and import its…

Egor
- 39,695
- 10
- 113
- 130
0
votes
0 answers
How do I solve Free variable error in Turbo Prolog?
I am working with Turbo prolog Dynamic DataBase.
So here is my database making as well as free variable error containing code.
domains
song = song(songName,songGenre,songRelease,singerName,likes,dislikes)
movie =…

Prashant Aghara
- 23
- 3
0
votes
0 answers
Fibonacci Series in Turbo Prolog
Trying to do this turbo prolog code but is giving error.
predicates
fibo(integer,integer)
clauses
fibo(0,0).
fibo(1,1).
fibo(X,N):-
N>1,
N1=N-1,
N2=N-2,
fibo(F1,N1),
fibo(F2,N2),
F=F1+F2,
write(F),write(",").

Prashant Aghara
- 23
- 3
0
votes
1 answer
A union of a conditions
i'm pretty new to prolog and now only the very basics
and i ran into a problem
i need to write a statement line this: and ( or )
in languages like c++ it would look something like this:
if( && ( || ))…

ZecosMAX
- 216
- 1
- 9
0
votes
2 answers
How to append 1 element in nested list in Prolog?
I want to append one list element in nested list:
predicates
append(li,li,li).
clauses
append([X|Y],Z,[X|W]):- append(Y,Z,W).
append([],X,X).
For example:
append([ [1],[2],[3] ],[4],A)
Solution: A = [ [1],[2],[3],[4] ]
Turbo Prolog said:…

azh
- 13
- 1
- 1
- 4
0
votes
3 answers
Turbo Prolog: 420 PROLOG.ERR missing
I'm quite new in Prolog. I'm trying to find the nth term and sum of a Fibonacci Series.
/* Fibonacci */
predicates
fibonacci(integer, integer, integer)
clauses
fibonacci(1,1,1):-!.
fibonacci(2,1,2):-!.
fibonacci(N, Term, Sum):-
N1 = N -…

lu5er
- 3,229
- 2
- 29
- 50
0
votes
1 answer
Visual Prolog error c502: The expression does not produce a value
I am trying to translate a simple Turbo Prolog problem to Visual Prolog 7.1
The original Turbo Prolog code is the following.
DOMAINS
s=string sl=s* sll=sl*
PREDICATES
select(sl,s,sl)
solve(sll)
…

Lowry
- 428
- 5
- 12
0
votes
0 answers
Prolog stackoverflow
I need help with some TURBO-Prolog Program.
There is some list, which contains only integers. The list elements should be split up into 3 lists (X, Y, Z). The X-list should contain integer values with (x mod 2 == 0 && x mod 3 == 1), the Y-list…

N.Zukowski
- 600
- 1
- 12
- 31
0
votes
1 answer
Convert string to Upper and Lower case Turbo Prolog
How do I convert a string to Upper and to Lower case in Turbo Prolog.
string_upper and string_lower function is for SWI Prolog,
I found something like,
tolower([], []).
tolower([Upper|UpperTail], [Lower|LowerTail]) :-
char_type(Lower,…

Hunterr
- 553
- 1
- 8
- 28