samples/basic/tutorial/hello_2
Now it's time to make hello smarter with a text object. Text objects have textual values that can have embedded goals in them. So, instead of a simple-valued fact for hello, this time we'll use a text object that has the embedded goal of putting your name in the message.

The %name% is the embedded goal. It means, don't actually provide a value for this text object until we've satisfied the goal name, and put that value in the text string.
How do we find a value for the goal name? Well, let's ask the user. To do that we create a question object.

We can look at more detail of the four panels presented here.
Upper Left - The current state of the system, including the unsolved goals (probably none, represented as [], at the end), and what is known.
Lower Left - A trace of the reasoning process. Note the interruption as the user is asked a question.
Upper Right - The goal.
Lower Right - The output values of the goal.
|
|
Copyright ©1995-2006 Amzi!
inc. All Rights Reserved. Privacy Policy.
Amzi!, KnowledgeWright and WebLS are registered
trademarks and Adventure in Prolog, Logic Server, Logic Explorer, Adventure
in Prolog and Subscription Plus are trademarks of Amzi! inc.