Announcement

Collapse
No announcement yet.

compiler feature - or just a tired programmer?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • compiler feature - or just a tired programmer?

    this

    Code:
        IF WL(i).zposn > Wl(w).zposn THEN ME.re_draw(i, redrawrect, 1)
    gets me a 526 error (period not allowed)

    but this
    Code:
         IF WL(i).zposn > Wl(w).zposn THEN 
            ME.re_draw(i, redrawrect, 1)
         END IF
    doesn't - anyone else seen something similar?

  • #2
    just this

    at first glance ...

    no END IF

    Comment


    • #3
      Looks like single line IF parser in the compiler has a problem with UDT members. Try:

      IF (WL(i).zposn > Wl(w).zposn) THEN ME.re_draw(i, redrawrect, 1)

      note added parens

      Also there are some folks who think the single line IF format should never be used anyway. It's a subject that can lead to flame wars. I'll only say that I very rarely use it.

      added: which period was cursor next to when you got the error? If after the "THEN", then different answer is needed.

      Cheers,
      Last edited by Dale Yarker; 9 Nov 2008, 01:26 AM. Reason: added
      Dale

      Comment


      • #4
        Originally posted by Dale Yarker View Post
        If after the "THEN", then different answer is needed.
        'fraid so!

        Comment


        • #5
          If "ME.re_draw(i, redrawrect, 1)" is a SUB, then I don't understand how the IF/THEN/END IF format compiles without error. If it is a UDT array, then ??????
          Dale

          Comment


          • #6
            it's a method.

            Comment


            • #7
              See what happens when "insufficient code shown?"

              When asking for help one should always post code which is compilable, or what should compile but doesn't.
              Michael Mattias
              Tal Systems Inc. (retired)
              Racine WI USA
              [email protected]
              http://www.talsystems.com

              Comment

              Working...
              X