home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Between Heaven & Hell 2
/
BetweenHeavenHell.cdr
/
garden
/
tutor.hyp
< prev
next >
Wrap
Text File
|
1988-06-15
|
4KB
|
144 lines
/page1
KNOWLEDGEPRO TUTORIAL PAGE 1
This example shows how hypertext can be used to present technical
information in a training environment.
The example used is taken from the #mKnowledgePro#m tutorial.
PRESS SPACE TO CONTINUE
/end
/page2
KNOWLEDGEPRO TUTORIAL PAGE 2
#msay ('This is part of a customer support system.').#m
#mask ('Which system are you using?',system,[Zenith,Corona,Other]).#m
#mdo (?system).#m
#mtopic#m Zenith.
say ('We have had problems with screen displays on this system.').
end.
topic Corona.
say ('There are #m##mold ROMS##m#m that can cause problems.').
end.
topic 'old ROMS'.
#mwindow ().#m
say (' Read Only Memory chips on the system mother board.
These can be upgraded quite easily.').
close_window ().
end. USE F3 TO SELECT A THREAD
/end
/page3
KNOWLEDGEPRO TUTORIAL PAGE 3
Once you are familiar with the six basic commands
say
ask
do
topic
##m
window
you can begin knowledge processing. As your experience grows and you need
more power and control you can learn more of the KnowledgePro commands.
You can even write your own commands either in KnowledgePro itself or in
another language.
PRESS SPACE TO EXIT
/end
/say ('This is part of a customer support system.').
The say command is one way to put information on the screen in
KnowledgePro. For example : say(hello).
If the information to be displayed contains spaces then it is
enclosed in quotes: say('hello, my name is John').
Any statement can be explained in more detail using ##m to mark
hypertext concepts.
/end
/ask ('Which system are you using?',system,[Zenith,Corona,Other]).
The ask command is one way to obtain information from the user.
In this example the #mlist#m of three possible answers are presented
as a menu and the response is put in the #mtopic#m "system".
Any question can be explained in more detail using ##m to mark
hypertext concepts.
/end
/#mold ROMS#m
This is one way that hypertext can be used in KnowledgePro.
When the user selects a hypertext node a #mtopic#m with the same
name is invoked as shown here. The topic can contain any further
hypertext or any KnowledgePro command including calls to external
programs.
/end
/list
KnowledgePro deals with lists. In this case a list of possible
responses to the question.
Items in a list are always enclosed in square brackets and
separated by commas.
Almost all KnowledgePro commands work with lists.
Any item in a list can, itself, be a list.
/end
/topic
The topic is the central structural unit in the KnowledgePro
development environment. It can contain rules, commands or
hypertext. Topics can also be written in other languages.
A topic always ends with an "end." statement
/end
/do (?system).
The do command causes a #mtopic#m, or a list of topics, to be
invoked. Topics are also invoked automatically by the system
if their value is needed elsewhere in the knowledge base.
/end
/window ().
The window command, like most KnowledgePro commands, has many
defaults which you can use until you want to control the
details of such things as size, colors and position.
Overlapping windows can be opened to let you display more
information about a particular subject, and then peeled away to
return to the main thread when appropriate.
/end
/KnowledgePro
TextPro is written in the KnowledgePro language.
But it only skims the surface of what we can do with
hypertext in the full KnowledgePro environment.
/end