Visual Basic .NET Pets Callback Sample

This is a slightly more complex version of Pets in which the Prolog program has a prompt/2 predicate used to get information from the user. In the example, it is used to ask the user for the sound the pet makes.

prompt/2 is implemented as an extended predicate in the Visual Basic program, illustrating the technique of having extended predicates associated with instances of classes derived from the Logic Server.

Building the Sample

  1. Open the pets_callback project.
  2. Make sure the 'References' include amzinet.dll.
  3. Build pets_callback.exe.
  4. Optionally copy amzi.dll to the bin subdirectory where amzinet.dll and pets_callback.exe are located.
  5. Compile and link pets.pro and copy pets.xpl to the bin subdirectory.

Running the Sample

  1. Run pets_callback.exe.
  2. Enter a sound like 'woof', 'quack' or 'meow'.

Copyright ©1987-2004 Amzi! inc. All Rights Reserved. Amzi! is a registered trademark and Logic Server and e-Prolog are trademarks of Amzi! inc.