Algernon Tutorial 2.c
Utility Routines
previous   next
These exercises and examples use the newspaper project included
in the examples folder of your Protege installation.
:DATE - retrieve the current date and time
  - ((:date ?date))
- ((:date ?date ?time))
:PRINT and :PRINTLN
Notes: These don't currently print to the Algernon
tab output window.  You must run Algernon from the
command line to see the output.
 - ((:DATE ?date)
 (:SUBCLASS Author ?a)
 (:PRINTLN ?a " is a type of author on " ?date))
- Bonus: What might change in the output if you swap the first two clauses?
:TRACE
Note: this does not currently print to the Algernon tab output window.
:TRACE is used for debugging and sets a global trace level.  Trace levels are:
  - :NORMAL
- :SILENT
- :VERBOSE
- :DETAIL
 - ((:trace :verbose) (:subclass Author ?a) (:trace :normal))
- ((:trace :verbose) (:subclass Newspaper ?n) (:trace :normal))
:NEQ - not equal
  - :NEQ is used to compare any two things for equality.
- Should work for frames, numbers, strings, etc.
:NEQ can be used to generate combinations of a set of objects:
  - ((:subclass Author ?a1) (:subclass Author ?a2) (:neq ?a1 ?a2))
- Try that with :TRACE set to :VERBOSE
Related links
previous   next
Author: Micheal Hewett
Email: mhewett@users.sf.net
Last Updated: Monday, June 06, 2005