End Sub script error

547 views
Skip to first unread message

semeon...@gmail.com

unread,
Dec 18, 2014, 1:50:43 PM12/18/14
to e-p...@googlegroups.com
I'm getting an unusual error that I'm hoping someone might have some perspective on. The error is below with the corresponding script.

Thanks,

- Semeon


Error ------

The following error was found while attempting to compile the E-Basic script:

Encountered: End Sub
Expecting: Next

Line: 373
Column: 5


Script ------

Procedure_FinishResume:

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Label - Procedure_Finish END
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

End Sub

Sub BlockProc_Run(c as Context)

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Label - Procedure_Start BEGIN
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

David McFarlane

unread,
Dec 18, 2014, 2:01:05 PM12/18/14
to e-p...@googlegroups.com
Semeon,

Well, this just looks to me like you started a For..Next loop, and
failed to close it with a Next. Pedestrian mistake, really. Look
through your InLine code segments, look for any For statements
(search will help with this), and make sure each one is followed
later by a Next statement. Properly indenting your code will vastly
help with this. While you are at it, best programming practice also
calls for including the For variable in the Next statement, e.g.,

For i = 1 to 10
...
Next i

instead of

For i = 1 to 10
...
Next

This will help you catch mistakes during compilation, instead of
getting a program that runs but does not really do what you meant.

-----
David McFarlane
E-Prime training
online: http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (https://twitter.com/EPrimeMaster)

/----
Stock reminder: 1) I do not work for PST. 2) You may reach PST's
trained staff (and other support facilities) at
https://support.pstnet.com . 3) If you do get an answer from PST
staff, please extend the courtesy of posting their reply back here
for the sake of others.
\----

semeon...@gmail.com

unread,
Dec 19, 2014, 2:16:24 PM12/19/14
to e-p...@googlegroups.com
Absolutely right about the mistake. Thanks again!

- Semeon
Reply all
Reply to author
Forward
0 new messages