The 'demo' file

BAP Online Manuals : Tools and Examples : Example Programs : The 'demo' file
Previous: The World
Next: The 'GRAPH'

4.2.3. The 'demo' file

The demo file ('DEMO.BAP') contains some predicates that can be called from the shell, presenting solutions to standard Prolog exercises (fib, factorial).

The take_time predicate times the execution of its argument.

Calling take_time (queens(8)) will open a window, execute queens in it and display the execution time.

Use clock(Time) to display the current time of day obtained from the server.

The call clock (start) will start a clock running independently in an infinte loop, displaying the current time.


BAP Online Manuals : Tools and Examples : Example Programs : The 'demo' file
Previous: The World
Next: The 'GRAPH'