home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / mswindo / programm / misc / 1740 < prev    next >
Encoding:
Text File  |  1992-09-08  |  2.0 KB  |  52 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!sequent!muncher.sequent.com!furballs
  3. From: furballs@sequent.com (Paul Penrod)
  4. Subject: Re: Recursion and Windows programming
  5. Message-ID: <1992Sep9.072827.29780@sequent.com>
  6. Sender: usenet@sequent.com (usenet )
  7. Nntp-Posting-Host: crg8.sequent.com
  8. Organization: Sequent Computer Systems Inc.
  9. References: <1992Sep8.111139.8820@iccgcc.decnet.ab.com>
  10. Date: Wed, 9 Sep 92 07:28:27 GMT
  11. Lines: 39
  12.  
  13. In article <1992Sep8.111139.8820@iccgcc.decnet.ab.com> schmidtg@iccgcc.decnet.ab.com writes:
  14. >
  15. >
  16. >I am in the process of converting a DOS program to run in the MS Windows
  17. >environment and I am having some difficulties.  The program uses a recursive
  18. >search routine to find the solution to a problem.  The program also must do
  19. >some screen output along the way.  The problem that I am having is in breaking
  20. >up the recursive algorithm so that it can be executed piece-meal in the
  21. >Windows event driven execution paradigm.  I want to run the algorithm
  22. >during idle time processing and so I must only execute a portion each time.
  23. >Since a recursive algorithm uses the machine stack, I don't know of an easy
  24. >way to save context and restore it between processing without getting down
  25. >and dirty.  I'm sure I'm not the only one who has encountered this problem.
  26. >How have others solved it?
  27. >
  28. >
  29. >I hope this isn't an FAQ, my humble apologies if it is.
  30. >
  31. >
  32. >Regards,
  33. >
  34. >
  35. >-- Greg Schmidt        schmidtg@iccgcc.decnet.ab.com
  36. >
  37.  
  38. Try using a state machine to describe the process, since that is
  39. much closer to Windows programming than Recursion is. (No acedemic
  40. arguments on theory please!). From a practical stand point, I have
  41. been able to break up and parcel out for execution most any
  42. algorythym I have needed in the past, especially for real time
  43. process control, and background processing.
  44.  
  45. Paul
  46.  
  47. -- 
  48. --------------------------------------------------------------------
  49.             Bureaucracy: noun, plural - Bureaucracies.
  50.          The process of turning energy into solid waste.
  51. ---------------------------------------------------------------------
  52.