//'*********************************************************************** //' DISPLAYED WITH PERMISSION OF ROY SCOTT ENTERPRISES //' AND THE AUTHOR AS AN ARCHIVING FUNCTION //' http://www.scottserver.net/forum/index.php //' ALL RIGHTS RESERVED //'************************************************************************ //' MINOR EDITING PERFORMED BY UPLA STAFF //'************************************************************************ //docmann //Microdeveloper //Although there's nothing new about loops with the new beta, here's some code to show how //simple they are to set up and to verify that nothing is broken... //Code: Declare %count%, %newcount%. // Define the main window, set the caption and style ?WINDOW Window1, 300, 250, 150, 60 {Window1>$Caption$}="Loop Test". {Window1>%Style%}='1'. @ShowWindow {Window1}. // Define a static label to display the count ?LABEL Window1>MyLabel, 60, 10, 150, 30 {Window1>MyLabel>$Font$}="Verdana". // Define a button ?Button Window1>Button1, 5, 10, 30, 20 {Window1>Button1>$Caption$}="Go!". {Window1>Button1>$Font$}="Verdana,10". // An "Action Procedure" to update our display Action (UpdateDisplay). %newcount% = %count%. {Window1>MyLabel>$Caption$}=%newcount%. EndAction. // An "Action Procedure" to initialize the counter and start the loop Action (StartCount). %count% ='0'. Loop %count%='5000'. %count% = %count% + '1'. UpdateDisplay. EndLoop. EndAction. // Set up our event loop and button event #eventloop. @SetEvent {Window1>Button1>!OnClick!}: StartCount. @WaitEvent. GoL eventloop. End.