Copyright ® (1999-2005) EDMGROUP Pty Ltd - EZY Prolog Reference

 makewindow

[This is preliminary specification and subject to change.]

Group

Textmode windows  (more...)

Type

determ

Syntax

makewindow( INTEGER WindowNo, INTEGER ScrAtt, INTEGER FrameAttr, STRING FrameStr, INTEGER Row, INTEGER Column, INTEGER Height, INTEGER Width)

Flow patterns

(i, i, i, i, i, i, i, i),(o, o, o, o, o, o, o, o)

 

Description:

Create a window with a default frame

Once defined, the window is cleared, and the cursor moves to the window's top left corner.

Sample:

/*
The combinations of Row and Height, and Column and Width, must define a window
that lies completely within the format of the display.
If any part of the window lies outside the display format, a run-time error will occur.
The size of the display can be changed with the text mode standard predicate.

Arguments to makewindow are as follows:

WindowNo Each window is identified by a number WindowNo, which you use when selecting the active window.
ScrAtt Attribute of the screen.
FrameAttr If FrameAttr is nonzero, makewindow draws a border around the defined area (framing the window).
FrameStr String that will be centered in the top border line If FrameStr = "" (empty string), no text will appear in the top border. If the text string is longer than the border, it will be truncated.

Row The row position of the top left corner of the window, relative to the whole screen.
Column The column position of the top left corner of the window, relative to the whole screen.
Height The height of the window, in terms of rows.
Width The width of the window, in terms of columns.
*/

PREDICATES

nondeterm  repeat

CLAUSES

repeat.
repeat :- repeat.

GOAL

makewindow(117"one"501020)write("ONE"),
makewindow(227"two"1101020)write("TWO"),
makewindow(337"three"2201020),  write("THREE"),
makewindow(447"four"8301020)write("FOUR"),
makewindow(557"five"4401020)write("FIVE"),
makewindow(667"six"5501020)write("SIX"),
makewindow(777"seven"951020)write("SEVEN"),
makewindow(887"eight"1101020),  write("EIGHT"),

makewindow(997"nine"15201020)write("NINE"),
repeat,

random(9,X)N=X+1shiftwindow(N),
framewindow(112),  sleep(10),   framewindow(7),

keypressed.

Copyright © 1997-2005 EDMGROUP (Australia)