Move from old versions to this one
 

This is a help tool which is provided for people who have programs which work with an old version of Strawberry Prolog but do not work with this one due to some small changes which we made in the built-in predicates.

All such changes are described here. In order to correct your program start from the last version with which your program is working and make all changes to the current version.

From version 1.6 to version 1.7

The key word built_in is changed. If you have it in your program you should to replace it with ***.

From version 1.2 to version 1.21

In this version the predicate for is changed. If you have for(I,A,B) in the old version it would make a loop for I from A up to B but without B. In this version the loop will be from A  to B (included).

The easiest way to correct this in your old programs is to replace for(I,A,B) with for(I, A, B- 1) everywhere. Note that in this version you can write expressions in the place of A and B. Analogically  if you have for(I,A,B,Step) then replace it with for(I,A,B- 1,Step) if the Step is positive and with for(I,A,B+1,Step) if the Step is negative.

Other change is in the predicates size and position. Now they have one more argument which shows which is the window that is all about. The easiest way to correct your old programs is to replace everywhere size(X,Y) with size(_,X,Y) and analogically for the position.

If you use brush(R,G,B) where R, G, B mean reed, green and blue then you have to replace it with brush(rgb(R,G,B)).

Predicate count_list is changed with function and its name is list_length

From version 1.02 to version 1.2

Many predicates now are functions and you have to change their syntax. For example is you have in your program print(S, T), then you should to replace it with S is print(T). The full list of predicates which became functions follows:

get
get_text
open
parent
print
random
rgb
scan
system_color
select_file
select_color

In version 1.2 the way in which you can define functions is changed. For example, if you wish to define function add(X,Y) and to use it like Result is add(2,2) to obtain 4 then the old definition style is:
add(Result, X, Y) :- Result is X + Y.

and the new style is:
Result is add(X,Y) :- Result is X + Y.

From version 1.0 (beta release) to version 1.0 (beta release2)

predicate / is changed with //.
predicate get_time is changed with chronometer
The argument of wait now is in seconds, not in centiseconds. Correct it by changing Time with Time/100.
The predicates get, put, get_text and set_text changed the places of their first two arguments.

The predicates bitmap and icon lost their last two arguments.

From version 0.7 to version 1.0 (beta release)

The predicates: pen, brush, window_brush, color_text, color_text_back, select_color are changed. The change is that instead of three arguments for the color now they have only one argument. Correct them by changing of Red, Green, Blue with rgb( Red, Green, Blue).