home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / XTALK1.ZIP / DDESLAVE.XWS < prev    next >
Encoding:
Text File  |  1990-04-30  |  1.1 KB  |  41 lines

  1. /*      Sample DDE Server - Don't run this script.
  2.         Copyright (C) 1989, 1990 Digital Communications Associates, Inc.
  3.     All Rights Reserved.
  4.         04/01/89 - chr
  5.  
  6.         This scripts waits for "to_be_squared" to be poked
  7.         then squares it and stores the result in "the_answer"
  8.         and then waits for the next item to be squared.  If the
  9.         variable "quit_now" is poked with a "q" then the script will
  10.         terminate immediately.
  11. */
  12.  
  13. integer to_be_squared,the_answer
  14. string  quit_now
  15.  
  16.         clear                           /* clear the crt */
  17.  
  18.         to_be_squared = 0
  19.  
  20. label   the_top
  21.  
  22.         print "waiting for 'to_be_squared' to be poked"
  23.  
  24.         while to_be_squared = 0 and quit_now <> "q"
  25.                 wait 5 ticks
  26.         wend
  27.  
  28.         if quit_now = "q" then print "we're done" : wait 1 second : terminate : end
  29.  
  30.         the_answer = to_be_squared * to_be_squared
  31.  
  32.         print str(to_be_squared)+" squared is "+str(the_answer)        
  33.         
  34.         to_be_squared = 0
  35.  
  36.         goto the_top
  37.  
  38. end
  39.  
  40.  
  41.