It'd be easier to use shared memory instead of networking commands.
Compile the following to a program named 'master':
sync on
sync rate 60
sync
sync
sync sleep 1
map shared mem to bank "SYNCHRO", 1, 4096
Counter = 1
do
wait key
write bank integer 1, 0, Counter
print "Wrote a value of "; Counter; " to shared memory"
sync
inc Counter
loop
Compile the following into a program named 'slave':
sync on
sync rate 60
sync
sync
sync sleep 1
map shared mem to bank "SYNCHRO", 1, 4096
LastValue = bank integer(1, 0)
do
repeat
nice wait 1
NextValue = bank integer(1, 0)
until LastValue <> NextValue
print "Just got the value "; NextValue; " from shared memory"
sync
LastValue = NextValue
loop
Run a few of the slave program, and one of the master. With the master program selected, just press space bar a couple of times - each time you do, the slave programs will respond.
You have to take care when running multiple DBPro programs together - they will pretty much run flat out and use all of your available processor cycles. That's why I used SYNC SLEEP in both programs, and NICE WAIT in the slave program.