GPDL $RESPOND Keyword



This is a complex macro-like keyword. Writing:



$RESPOND ( a, b);



Is the same as writing:



$IF ( $GREP ( a, $LISTENTEXT() ) )

{

$SAY ( b );

$CONTINUE;

};



Notice the '$CONTINUE' in particular........$RESPOND is designed only to be run from within a looping structure. Something like this perhaps:



$WHILE ( $LISTEN() )

{

$RESPOND (“NAME” , “My name is Paul”);

$RESPOND (“JOB”, “I sell bedsprings”);

$RESPOND (“Simon”, “Simon works in the tavern at Yew”);

$SAY (“ I am leaving now”);

$BREAK;

};