Announcement

Collapse
No announcement yet.

error 481

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

  • Ken Elvehjem
    replied
    I made the request, and PB replied that it had been duly logged.

    Ken

    Leave a comment:


  • Michael Mattias
    replied
    the compiler could just tell us that the *other* offending line was line 1957 of "KensMonsterInclude.inc."
    I have had that in as a new feature suggestion for some time. However, unless others actually take the time to send a New Feature Suggestion to [email protected] it will seem to the PBPTB as though only one user asked for it.

    Leave a comment:


  • Ken Elvehjem
    replied
    Gösta

    Yes, the PB9 editor does that, too.

    What I'm carping about is that it doesn't show me the *other* offending line.

    Obviously, in this case, my problem is solved. But I could have moved on much more quickly (and without a post to my friends here) if the error message had said:

    Code:
    Error 481 in C:\MISSEDITV2\EDIT.INC(19:023):  Mismatch with prior definition
    "Point" is a Built-In Structure  
    Line 19:     MarkIt AS STRING*1
    or even:

    Code:
    Error 481 in C:\MISSEDITV2\EDIT.INC(19:023):  Mismatch with prior definition
    "Point" is a Built-In Structure, you dummy!  
    Line 19:     MarkIt AS STRING*1
    instead of:

    Code:
    Error 481 in C:\MISSEDITV2\EDIT.INC(19:023):  Mismatch with prior definition
    Line 19:     MarkIt AS STRING*1
    Or, in the event that the disjoint was from a declared type, dimensioned array, or a function name in an included file with which I was not intimately familiar, or an include that was called by an include which was called by another include (and no, that's not *usually* one of my bad habits:>) the compiler could just tell us that the *other* offending line was line 1957 of "KensMonsterInclude.inc."

    Seems that would save us all some time.

    Thanks for your reply, Gösta!

    Sincerely,

    Ken

    Leave a comment:


  • Gösta H. Lovgren-2
    replied
    Originally posted by Ken Elvehjem View Post
    -- couldn't our compiler show us a list of the mismatches?

    so *tell us* where it is, already!

    Ken
    Dunno about PB IDE or PB Forms but with JellyFish Pro, after the error msg is dismissed, the cursor is right on the offending line at the point of offensiveness.

    =================================
    "A witty saying proves nothing."
    Voltaire (1694-1778)
    =================================

    Leave a comment:


  • Ken Elvehjem
    replied
    José & Michael,

    Thank You! for the responses.

    That's an easy fix, I reckon.

    Michael, I appreciated your note about [email protected], and will certainly forward that on.

    I didn't wanna mention it earlier, but I seems that there are a lot of error messages that are a little short on meat. Like for instance the duplicate definition error (or mismatch with prior, or whatever) -- couldn't our compiler show us a list of the mismatches?

    I realize that some folk probably never get one of those errors, and for others, part of the fun is finding the duplicates... But I think for the rest of us, it would be nice if the duplications were enumerated. And I can't imagine it being a lot of extra work for the compiler; after all, it *already* found the mismatch, so *tell us* where it is, already!

    OK, this may not make sense. If it doesn't, well then I'm in for a verbal drubbing. And if that's the case, I hope someone points out *why* it's not a good thing;>)

    Anyway, thanks again for your tips!

    Sincerely,

    Ken

    Leave a comment:


  • Michael Mattias
    replied
    This program element (TYPE, UNION, SUB, FUNCTION, etc.) does not match a declaration or definition found previously in the program. It could be a SUB or FUNCTION which mismatches a declaration, a duplicate TYPE or which is not identical, or another similar condition.
    Since the error occurred on the "TYPE" line, the text suggests the type "POINT" is previously defined in your program.

    There are many TYPES defined in WIN32API.INC, so if "#INCLUDE WIN32API.INC" precedes your definition, and "TYPE POINT" is in that file but defined differently, you'll get this error.

    General Fix: Move the TYPE statement to the very first line of your program, after the compiler directives (eg #COMPILE, #DIM, etc) but before any #INCLUDE. Recompile; the same error should now occur on the line where type POINT was FIRST defined in your program as originally written.

    Specific Fix: This came up here last week I think. Apparently the compiler provides a pre-defined "TYPE POINT" .... but did not bother to document it anywhere.

    So... just change the name of your TYPE (the definition of which does not match the predefined definition) and you will be just fine.

    MCM
    PS: throw in a note to [email protected] to tell them of your problem, and how better documentation and/or a better error explanation (eg "TYPE definition does not match predefined definition of TYPE POINT") would have made your life a lot easier.
    Last edited by Michael Mattias; 19 Sep 2009, 10:32 AM.

    Leave a comment:


  • José Roca
    replied
    Point is a built-in structure in PB 9. Just change the name.

    Leave a comment:


  • Ken Elvehjem
    started a topic error 481

    error 481

    Hi,

    I am editing a program from PB8 in PB9 (moving up, moving on). It compiles without a problem in PB8; in PB9, I get error #481 on the following "type" definition:


    Code:
    TYPE Point
        x AS LONG
        y AS LONG
        MarkIt AS STRING*1
    END TYPE
    This program has a number of includes which I have been careful to make available, but I can't seem to find a reason for it to return this error.

    Reading the Help file on #481, it's very short and to the point, but (almost) doesn't seem to apply.

    I've had this problem with other programs that I have moved to PB9, but in each case, I found I did not need the elements in question and eliminated them, eliminating the problem. Can't do that this time...

    I'd appreciate any suggestions or observations.

    Sincerely,

    Ken
Working...
X