This article applies to:
E-Prime 3.0
E-Prime 2.0
Symptoms
Using a While...Wend statement in an experiment causes ScriptSense to break and CPU usage to rise.
Detail
While...Wend statements are effectively deprecated in E-Prime due to the problems they cause. In ScriptSense, the Wend statement does not highlight, auto-completion breaks, and incorrect words become incorrectly colored. Additionally, you can observe the rise in CPU usage in Task Manager when using a While...Wend statement.
For more information on While...Wend, please view the following E-Prime Command Reference topic: https://pstnet.com/ecr/#t=E-Basic%2FW%2FWhile...Wend-E-Basic_Language_Object.htm.
Workaround
NOTE: There is no planned BugFix at this time. We strongly encourage using the Workaround.
Instead of a While...Wend statement, use a Do...Loop:
' Uncomment out the Wend in order to instantly
' break script sense (watch CPU in Task Manager)
Display.Canvas.Text 0, 0, "Performing Test"
Dim myBoo As Boolean
myBoo = True
' Do NOT use While...Wend. Use the Do...Loop below.
'While myBoo = True
'Debug.Print "here"
'Sleep 1500
'myBoo = False
'Wend
' The Do...Loop.
Do While myBoo = True
Debug.Print "here"
Sleep 1500
myBoo = False
Loop
See Also:
RELEASE INFO: Known Issues in E-Prime 3.0 Update 2 (3.0.3.80) [27789]
Comments
0 comments
Please sign in to leave a comment.