>But PB9-compiled on XP just quit.
Should not just "quit." Let me try it...
Interesting, sets error 7.
Possible errors documented for STRING$ function: NONE.
Error 7 is
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:
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
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
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.
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.
I shall send in a bug report.
MCM
Comment