Announcement

Collapse
No announcement yet.

Program compiled by PBwin9 needs more machine memory than by PBwin8?

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

  • #21
    >But PB9-compiled on XP just quit.

    Should not just "quit." Let me try it...
    Code:
     #COMPILE EXE
    #DIM ALL
    
    FUNCTION PBMAIN () AS LONG
        
        LOCAL names AS STRING, S AS STRING
        
        names =  "1234567890123456789012345678901234567890"
        
        S =  STRING$((28-LEN(names)),95)
        
        MSGBOX USING$ ("ERR #  S '&'", ERR, S)
        
    END FUNCTION
    Interesting, sets error 7.
    Possible errors documented for STRING$ function: NONE.
    Error 7 is
    Out of memory - (%ERR_OUTOFMEMORY) - Many different situations can cause this message, including dimensioning too large an array, or running out of virtual memory due to insufficient free disk space for the Windows swap file.
    Methinks EITHER
    A) The documentation for error 7 is incomplete.
    B) The documentation for STRING$ is incomplete
    C) The actually IS a bug in the compiler, setting the wrong error. I think the correct error should be error 5:

    Illegal function call - (%ERR_ILLEGALFUNCTIONCALL) - This is a catch-all error related to passing an inappropriate argument to some statement or function.
    Seems to me a passing a negative length to the STRING$ function would constitute "passing an inappropriate argument to some statement or function. "

    I shall send in a bug report.

    MCM
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment

    Working...
    X