Created
December 31, 2014 14:04
-
-
Save MarkGoldberg/9e9aea74e3ac227989d8 to your computer and use it in GitHub Desktop.
Clarion: Working ProgressBar in a TightLoop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROGRAM | |
! Purpose: to show that a progress bar can be updated in a tight loop | |
MAP | |
END | |
ProgressBar LONG | |
Window WINDOW('Test Progress Bar in Tight Loop'),AT(,,463,70),GRAY,FONT('Segoe UI',8),SYSTEM | |
BUTTON('Start Tight Loop'),AT(191,39,,14),USE(?Start),DEFAULT | |
PROGRESS,AT(13,13,400),USE(ProgressBar),RANGE(0,100) | |
END | |
CODE | |
OPEN(Window) | |
ACCEPT | |
CASE ACCEPTED() | |
OF ?Start; DO TightLoop | |
END | |
END | |
TightLoop ROUTINE | |
DATA | |
N LONG | |
CODE | |
ProgressBar = 0 | |
?ProgressBar{PROP:RangeHigh} = 10^5 | |
LOOP N = 1 TO 10^8 | |
IF N % 1000 = 0 | |
ProgressBar += 1 | |
DISPLAY(?ProgressBar) | |
END | |
END | |
MESSAGE('Done') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, iam new in Clarion, Known that i wish if you can help me
what CODE MEANS IT , IN WHICH code belong
"CODE"
OPEN(Window)
ACCEPT
CASE ACCEPTED()
OF ?Start; DO TightLoop
END
END
thanks regards