fn siminit{ simend=128 simlimit=32 name=$mynum type=ping state=($name $type) sendout=$state echo ___INITIATE $dim dimensional pingpong echo $cvt $state } fn updatestate{ name=$state(1) type=$state(2) } fn msgproc{ rname=$body(1) rtype=$body(2) echo recv $rname $rtype if(~ $rname adm) rtype=update switch($rtype){ case update type=$body(2) echo _____ $type from adm case ping type=pong case pong type=ping } } fn tickstate{ state=($name $type) sendout=$state echo $cvt^':' $state }