Forums › Forums › SIMPOL Programming › vexing errors
- This topic has 3 replies, 3 voices, and was last updated 11 years ago by Michael.
- AuthorPosts
- April 8, 2013 at 3:14 pm #316JD KromkowskiParticipant
I’ve just started getting errors like this. Error in statement: end function Error: ‘end function’ reached within if or while block. Error in statement: function AddDates(wxmenuitem me,type(application) app) Error: Invalid characters found in local variable list – ‘(‘. But my AddDates function is completely empty. See below. function AddDates(wxmenuitem me,type(application) app) end function
April 8, 2013 at 5:24 pm #2216Jean ValleeParticipantOn 4/8/2013 11:14 AM, kromkowski wrote:
>
> I've just started getting errors like this.
>
> Error in statement: end function
> Error: 'end function' reached within if or while block.
>
> Error in statement: function AddDates(wxmenuitem me,type(application) app)
> Error: Invalid characters found in local variable list – '('.
>
>
> But my AddDates function is completely empty. See below.
>
>
>
> function AddDates(wxmenuitem me,type(application) app)
> end functionThe IDE is not being accurate.. to say the least. That message could
actually be referring to code above it. or you're missing an end
function somewhere else.Been down this road many times. have learned to compile frequently so I
can keep track of what I've changed/added. When I get errors like that,
it's usually in what I just wrote even though the error refers to a
perfectly good function.also a gotcha.. if you use the Find in project and but click in the code
window, you will inadvertently put in garbage before you realize you're
not typing in the input box.Jean Vallee
April 9, 2013 at 8:44 pm #2217JD KromkowskiParticipantThe problem turned out to be a missing "end if" which lead the error
handling to read through to next function. As I got rid of functions,
it even told me that there was a problem with main() – because it read
through to the end and then started from the beginning.I'm usually pretty good on end ifs because I tend to write the if end if
blank to start and then fill in.On 04/08/13 1:24 PM, JV wrote:
> On 4/8/2013 11:14 AM, kromkowski wrote:
>>
>> I've just started getting errors like this.
>>
>> Error in statement: end function
>> Error: 'end function' reached within if or while block.
>>
>> Error in statement: function AddDates(wxmenuitem me,type(application)
>> app)
>> Error: Invalid characters found in local variable list – '('.
>>
>>
>> But my AddDates function is completely empty. See below.
>>
>>
>>
>> function AddDates(wxmenuitem me,type(application) app)
>> end function
>
> The IDE is not being accurate.. to say the least. That message could
> actually be referring to code above it. or you're missing an end
> function somewhere else.
>
> Been down this road many times. have learned to compile frequently so I
> can keep track of what I've changed/added. When I get errors like that,
> it's usually in what I just wrote even though the error refers to a
> perfectly good function.
>
> also a gotcha.. if you use the Find in project and but click in the code
> window, you will inadvertently put in garbage before you realize you're
> not typing in the input box.
>
> Jean ValleeApril 10, 2013 at 11:27 am #2221MichaelKeymasterOn 09/04/2013 21:44, kromkowski wrote:
> The problem turned out to be a missing "end if" which lead the error
> handling to read through to next function. As I got rid of functions,
> it even told me that there was a problem with main() – because it read
> through to the end and then started from the beginning.
>
> I'm usually pretty good on end ifs because I tend to write the if end if
> blank to start and then fill in.These are certainly the harder sort of thing to track down. I also try and make sure I put in both pieces to start with and also
use a consistent indentation approach.Ciao, Neil
- AuthorPosts
- You must be logged in to reply to this topic.