Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

**** miniPROLOG **** ..... PROLOG DUAL TAIL RECURSION

2 views
Skip to first unread message

Graham Cooper

unread,
Feb 26, 2023, 3:02:11 AM2/26/23
to
A LOT of Trial and Error to get it right!



CALLTAIL( $TAIL $TAILNUM )
{
....


if ($c[$ans][1] > '')
{
$retval = head( $c[$ans][1] ); // ***************** call to function
}

if ( $c[$tail][$tailnum+1] > '' )
{
$retval = calltail($tail,$tailnum+1); // ************ call next tail
if (!$retval)
{
$qstart = $ans; // ************ TRY AGAIN BEGINNING AT NEXT RECORD
$fin = false;
$v = $origv;
}
}

} // **************** ANS > 0

} //**************** WHILE

return $retval;
}



PROTYPE V1.0

www.miniPROLOG.com

Try Entering [ happy gaga ] [ QUERY ]

0 new messages