TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ALLE
from: THOMAS GOHEL
date: 1996-09-01 00:00:00
subject: FAQ: PowerBASIC 05/16 (Bug`s - Part 3)

    2.25. The "File not found"-Error after using NAME
    -------------------------------------------------
    Versions: 3.0/3.1/3.2
    Known   : No
    There is a very strange Error in the internal PowerBASIC filehandle
    management after using the command "NAME".
    Example:
           OPEN "B",1,"DATEI1.TMP"       ' Open first file
           OPEN "B",2,"DATEI2.$$$"       ' Open
           CLOSE 2                       ' ... and close immediately
           OPEN "B",3,"DATEI3.TMP"       ' Open
           CLOSE 3                       ' ... and close immediately
           KILL "DATEI2.$$$"             ' Delete second file
           NAME "DATEI3.TMP" AS "DATEI2.$$$"
                                         ' Rename third file to second file
           CLOSE 1                       ' ... Close first file
           END
    2.26. Calculationerror when using Constants
    -------------------------------------------
    Versions: 3.0/3.1/3.2
    Known   : No
    Sometimes PowerBASIC does not calculate correctly when using
    constants. Of course there is the question why you don't insert the
    answer right away, because it is just a matter of form.
    Example:
           i% = -20-4   : %k= -20-4
           PRINT i%     , %k
    2.27. Wrong "Bit movement" with ROTATE
    --------------------------------------
    Versions: 3.0/3.1
    Known   : Error corrected in Version 3.20
    The ROTATE-Command in PowerBASIC 3.0/3.1 has a Bug when using QUAD-
    Type Varibles.
    Example:
           i&& = 1
           ROTATE RIGHT i&&, 1
           ROTATE LEFT i&&, 1
           PRINT i&&
    2.28. Overflow when using FOR/NEXT-Schleifen
    --------------------------------------------
    Versions: 3.0/3.1/3.2
    Known   : No
    PowerBASIC doesn't allow to use the maximum value of a Variable in a
    FOR/NEXT-Loop. The maximum value is used internally by PowerBASIC
    because PowerBASIC first increments the Variable and then checks it.
    Logically there is an overflow when your Variable already has the
    maximum value.
    In my opinion this Bug applies to all Variabletypes.
    Example:
           FOR Demo? = 1 TO 255
               PRINT Demo?
           NEXT Demo?
|   Should you NOT use the "$ERROR NUMERIC" Library then the following FOR/
|   NEXT construction will cause an endless loop.
    2.29. Overflow when using STEP -1 in FOR/NEXT-Loops
    ---------------------------------------------------
    Versions: 3.0/3.1/3.2
    Known   : No
    PowerBASIC does not allow the down counting of  unsigned Variables in
    the valid range. While the is an overflow with Variables of type BYTE
    or WORD, the is not on with with DWORD because, as said, no
    overflowtesting was implemented. A FOR/NEXT-Loop with 'STEP -1' will
    not be worked out correctly!
    Example:
           FOR Demo?? = 10 TO 2 STEP -1
           NEXT Demo??
    or:
           FOR Demo??? = 10 TO 2 STEP -1
               PRINT Demo???
           NEXT Demo???
|   Should you NOT use the "$ERROR NUMERIC" Library then the following FOR/
|   NEXT construction will cause an endless loop.
    2.30. The Bug in the VARPTR32-Command
    -------------------------------------
    Versions: from 3.2 on
    Known   : No
    Against the correct implementation of STRPTR32 and CODEPTR32 there is
    a Bug in the VARPTR32-Command. It is not possible to do a mathematical
    operation at the same time.
    Example:
           DIM Demo AS STRING * 10
           Wert1??? = VARPTR32(Demo) + 1
           Wert2??? = VARPTR32(Demo)
           Wert2??? = Wert2??? + 1
           PRINT  Wert1???, Wert2???
    2.31. The 'KEY ON' Bug
    ----------------------
    Versions: 3.0/3.1/3.2
    Known   : No
    Listening to the PowerBASIC manual and the BASIC specifications of the
    KEY- Command the 'KEY ON'- Command is supposed to show the current KEY-
    Setup in line 25 similar to 'Norton Commander'. If this is the case
    PowerBASIC is supposed to put out an 'Error 5: Illegal Function' if
    the programmer wants to access line 25 using LOCATE. Line 25 is also
    supposed to be protected from scrolling.
    This is not the case anymore since PowerBASIC V3.x (unlike PowerBASIC
    V2.10) !
    Example:
            KEY OFF
            FOR i% = 1 TO 10
                READ A$
                KEY i%, A$ + CHR$(13)
            NEXT i%
            KEY LIST
            COLOR 3, 0
            KEY ON
            COLOR 7, 0
            LOCATE 25, 1: PRINT " This text should be captured!! ";
            WHILE NOT INSTAT
            WEND
            KEY OFF
            END
            DATA "Help", "Return"', "Edit", "Change", "Report"
            DATA "PRINT", "Setup", "DOS", "Copy", "Quit"
    The question here is wether this is a bug in the PowerBASIC manual or
    in the Compiler. In any case you can fix this using:
            VIEW TEXT (1,1)-(80,24)
    2.32. Crash of the PowerBASIC IDE in the Pick- Menu
    ---------------------------------------------------
    Versions: 3.0/3.1/3.2
    Known   : No
    The PowerBASIC IDE crashes when you press DEL instead of RETURN the
    first time you chose the menu "File\Pick". If you have opened "Pick"
    before with the RETURN- Key in the same session, this error will not
    occur. Personally I think this is a very serious error, because both
    keys are very close on the keyboard.
    2.33. Crash of the PowerBASIC IDE with faulty Syntax
    ----------------------------------------------------
    Versions: 3.0/3.1/3.2
    Known   : No
    The PowerBASIC IDE crashes if you try to compile the following line:
            PRINT Test1$ XOR Test2$ XOR Test3$
    I'd rather not discuss the function of this line. 
    2.34. Runtimeerror in the PowerBASIC Helpcompiler
    -------------------------------------------------
    Versions: 3.0 (Helpcompiler)
    Known   : No
    The Helpcompiler (Encoder) seems to have quitr a few Bugs. Mostly
    beginners will have some problems with Runtimeerror 9 at address
    10095. This is an internal Bug of the Helpcompile, which is caused by
    the missing of the Command '/LOOKUP'.
    2.35. The Error "Truncating" in the PowerBASIC Helpcompiler
    -----------------------------------------------------------
    Versions: 3.0 (Helpcompiler)
    The Error 'Truncating ... to 76 characters' will be shown sometimes,
    because the commandcharacters will not be taken into concern.
    2.36. Crash of the PowerBASIC-IDE after calling its own Help
    ------------------------------------------------------------
    Versions: 3.0 (Helpcompiler)
    When programming or actually the writting of the Help you will have to
    watch out that the effective length of the shown textline are not
    bigger than the actually existing number of characters available in
    the PowerBASIC-Helpwindow, because the PowerBASIC-IDE will in that
    case crash with a graphical error.
    This Bug will only occur in the developmentphase of a self-written
    Helpfile (*.PBH)!
--- CrossPoint v3.11 R
---------------
* Origin: -= http://www.snafu.de/~pbsound/ =- (2:2410/301.12)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.