Announcement

Collapse
No announcement yet.

"Previous declare - parameter mismatch"??

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

  • "Previous declare - parameter mismatch"??

    Hi everybody,

    I'm almost finished my first PB/DLL 6 project but I have come
    across a strange error that I can not figure out. I have an
    integer equate %MAX_NODE_SIZE that I set to size 1024. Throughout
    the source I dimension fixed length strings using the equate.
    Some of the strings are in TYPES and others are in the parameters
    to function and sub calls. All my DECLARE statements also use
    the equate.

    Everything works perfectly until I change the equates value. I
    thought I would try increasing the node size to see the result
    on performance. When I do this I get an error 481 that reads
    "Parameter mismatch with prior declaration". The Help manual
    explains this error as "There is a previous declare declaration
    with a parameter mismatch."

    The error points to an unrelated function that doesn't
    even use the equate in the parameter list or the code. If I REM
    out the declare for that function then the same error occurs but
    at a different function (and so on and so on).

    I tried search/replace to update all references to 1024 with
    2048 and the same error occurs.

    I can't post the source and I know this explanation does not
    seem very coherent but I hope someone may have encountered this
    senario before.

    Any suggestions would be greatly appreciated.

    Thanks!



    ------------------
    Paul Squires
    [email protected]
    Paul Squires
    FireFly Visual Designer (for PowerBASIC Windows 10+)
    Version 3 now available.
    http://www.planetsquires.com

  • #2
    Node type huh? Is this a host connection application?

    Could you have dimensioned an Asciiz value smaller than 2048 but larger than 1024 and ar4e passing that Asciiz value to a function that is expecting less?



    ------------------
    Scott
    mailto:[email protected][email protected]</A>
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

    Comment


    • #3
      Hi Scott,

      The DLL is an xbase/btree system in the same vein as Bullet and
      CodeBase.

      The strings in question are not ASCIIZ strings. They are usually
      dimensioned like DIM CachedNode AS STRING * %MAX_NODE_SIZE

      All the functions that accept these types of strings are have
      parameters like, FUNCTION GarbageNode(TheNode AS STRING * %MAX_NODE_SIZE)
      etc....

      The DECLARES for the functions and subs are also defined using the
      equates.

      The DLL works perfectly with 1024. It will also *compile* using
      various other numbers (e.g. 1200, 1300) but when run it does
      not produce the correct results - very wierd.

      I'll continue developing using the 1024 node size, but in the
      back of my mind this is nagging at me!

      Thanks.




      ------------------
      Paul Squires
      [email protected]
      Paul Squires
      FireFly Visual Designer (for PowerBASIC Windows 10+)
      Version 3 now available.
      http://www.planetsquires.com

      Comment

      Working...
      X