Skip to content

vexing errors

Forums Forums SIMPOL Programming vexing errors

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #316
    JD Kromkowski
    Participant

    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

    #2216
    Jean Vallee
    Participant

    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 Vallee

    #2217
    JD Kromkowski
    Participant

    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.

    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 Vallee

    #2221
    Michael
    Keymaster

    On 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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.