/Projects/Modules/JzConsole

JzConsole – standard input/output interaction module

JzConsole is a very simple module for agent’s interaction with standard input/output console.

In its first version it is even extremely simple, as it can handle on single words.

Query interface

Update interface

Notifications

Sample

test-console.jzz:

declare module environment as console

notify environment on cycle [{This is cycle notification!}]

when read environment (X,Y,Z) [{Provide variables please:}]
then 
{
        when read environment (X,Y,W) [{Provide variables again: }]
        then print environment(W,Y) [{Here are the variables:}]
}
$ jazzyk test-console.jzz -n 2

Provide variables please:
Provide a value for X: Peter
Provide a value for Y: Martin
Provide a value for Z: Fred
Provide variables again: 
Provide a value for W: Tweety
Here are the variables:
W = Tweety
Y = Martin
This is cycle notification!
Provide variables please:
Provide a value for X: Vilma
Provide a value for Y: Jane
Provide a value for Z: Ester
Provide variables again: 
Provide a value for W: Kathrin
Here are the variables:
W = Kathrin
Y = Jane
This is cycle notification!