This is a sample application that uses DLLs to add looping capability to ObjectVision.
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.
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.
Example Use of @WHILELOOP
1. Enter a Path Name
2. Press the button "Count Slashes"
3. Say "Wow!"
4. You can do steps 1 and 2 over and over and over ...
Put a loop count in Count, e.g., 5, and initialize Temp with 0.
2. Enter a condition, e.g.,
+Temp<Count
3. Enter an action expression, e.g.
[@MESSAGE(Temp)][@ASSIGN(Temp,Temp+1)]
4. Press the Action button and watch what happens.
5. Press Done to return to the main menu.
Enter an ObjectVision command, e.g., @SUM(1,2,3), in the following field.
Press the Execute button. ObjectVision executes the command you entered and places the result in field Result.
You can do steps 1 and 2 over and over. When you are finished, press Done.(
@TYPE(Result)=1
[@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)]&