home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a530 / 2.ddi / RTSMP.PAK / OVLOOPS.OVD (.txt) < prev    next >
Encoding:
ObjectVision Datafile  |  1991-10-30  |  4.0 KB  |  65 lines

  1. Demo of @WHILELOOP
  2. Scratch Variables
  3. @WHILELOOP Basics
  4. Expression Practice
  5. Count Slashes    
  6. Path Name
  7. Position
  8. Number of Slashes in Path Name
  9. Result
  10. @WHILELOOP Demo
  11. Expression Practice
  12. @WHILELOOP Basics
  13. Condition Expression
  14. Action
  15. Count
  16. Command
  17. Result 
  18. Action 
  19. Action Expression
  20. Return form
  21. Condition Practice
  22. Action Practice
  23. Courier
  24. Modern
  25. Courier
  26. Courier
  27. Courier
  28. Use Loops to add Power to Your Applications
  29. This is a sample application that uses DLLs to add looping capability to ObjectVision.
  30. This technique is used in three of the sample applications -- MOTEL.OVD, TBILL.OVD, and HANGMAN.OVD.  After you look through this example application, you may want to refer to them for more ideas.
  31. Note: A DLL is typically registered in the "Open" event of the stack.  To see the @REGISTER command for this application, right click on the application's title bar while in the form tool.
  32. Example Use of @WHILELOOP
  33. 1.  Enter a Path Name
  34. 2.  Press the button "Count Slashes"
  35. 3.  Say "Wow!"
  36. 4.  You can do steps 1 and 2 over and over and over ...
  37. Put a loop count in Count, e.g., 5, and initialize Temp with 0.
  38. 2.  Enter a condition, e.g.,
  39.         +Temp<Count
  40. 3.  Enter an action expression, e.g.
  41.         [@MESSAGE(Temp)][@ASSIGN(Temp,Temp+1)]
  42. 4. Press the Action button and watch what happens.
  43. 5.  Press Done to return to the main menu.
  44. Enter an ObjectVision command, e.g., @SUM(1,2,3), in the following field. 
  45. Press the Execute button.  ObjectVision executes the command you entered and places the result in field Result. 
  46. You can do steps 1 and 2 over and over.  When you are finished, press Done.(
  47. @TYPE(Result)=1
  48. [@ASSIGN(Result,@FIND("\",Path Name,Position))][@IF(@TYPE(Result)=1,@AND(@ASSIGN(Position,Result+1),@ASSIGN(Number of Slashes in Path Name,Number of Slashes in Path Name+1)),0)]&
  49. @WHILELOOP
  50. Demo of @WHILELOOP
  51. Expression Practice
  52. @WHILELOOP Basics
  53. @EXECUTE
  54. @WHILELOOP
  55. @WHILELOOP Basics
  56. Expression Practice
  57. @WHILELOOP Basics
  58. Expression Practice
  59. @REGISTER_OVLOOPS
  60. ovloops.dll
  61. SelfRegister
  62. @REGISTER_OVLOOPS
  63. +Temp<Count
  64. [@MESSAGE(Temp)][@ASSIGN(Temp,Temp+1)]
  65.