---------------------------------------------------- Such a short time before the release of V3.5 of the Compiler it is naturally very, very hard to find Points for improvement, but they do exist anyways. - XMS Support for VIRTUAL Arrays - SORT ARRAY Support fuer VIRTUAL Arrays - 32bit Inline-Assembler - Syntax Highlighting within the IDE - A better IDE --- CrossPoint v3.11 R * Origin: PBSOUND, PBFILES (32MB), PBFAQ, PBRULES, PBHIVGA at: 2:2410/330.1) --------------- FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: F1200002 Date: 01/01/98 From: THOMAS GOHEL Time: 12:00am \/To: ALLE (Read 1 times) Subj: FAQ: PowerBASIC 03/16 (Bug's - Part 1) ================================================================= 2. Errors/Inconsistencies in PowerBASIC Versions 3.0, 3.1 and 3.2 ================================================================= Shortindex: 2.0. PowerBASIC-Errorlibraries 2.1. The NUMERIC/OVERFLOW-Problem in PowerBASIC 3.0 2.2. The NUMERIC/OVERFLOW-Problem in PowerBASIC 3.1/3.2 2.3. No Overflow-Error with Doublewords 2.4. Crash of the PowerBASIC IDE and compiled EXE's while loading 2.5. EXEs of different size when compiling with PB/PBC 2.6. Different EXE-Files with same Compilation 2.7. Problems with the Mouse within the IDE 2.8. The Fixup Overflow Syndrome 2.9. The story with ASCII-154 after a Remark in the Inline-ASM 2.10. Error 454: END FUNCTION expected 2.11. Another REMARK-Problem with $ALIAS 2.12. The Mistake CDWRD in the german Online-Help 2.13. The Mistake CVDWRD in the german Online-Help 2.14. Crash when pressing CTRL-C 2.15. Error when producing Output with "CONS:" and CTRL-C 2.16. The Problem with Error 244 in a Stand Alone EXE 2.17. Problems with linking of multiple Lines of Source 2.18. Problems with the WATCH-Window and multidimensional Arrays 2.19. Buggy internal Function/Variable: pbvScrnCols 2.20. Incorrect internal Function/Variable: pbvHost 2.21. A little difference in the new Inline-Assembler of V3.1/3.2 2.22. The dd-Problem in PowerBASIC 3.1/3.2 2.23. Undocumented internal Variables in PowerBASIC 3.0/3.1/3.2 2.24. The PRINT-Bug in PowerBASIC 3.2 2.25. The "File not found"-Error after using NAME 2.26. Calculationerror when using Constants 2.27. Wrong "Bit Movement" with ROTATE 2.28. Overflow when using FOR/NEXT-Loops 2.29. Overflow when using STEP -1 in FOR/NEXT-Loops 2.30. The Bug in the VARPTR32 Command 2.31. The "KEY ON" Bug 2.32. Crash of the PowerBASIC IDE in the Pick- Menu 2.33. Crash of the PowerBASIC IDE with faulty Syntax 2.34. Error when swapping variables using SWAP 2.35. The Multiplexer Interrupt Error in the REG-Command 2.36. Contents of a Directory will be deleted with KILL 2.37. The thing with the "USR" string 2.38. Runtimeerror in the PowerBASIC Helpcompiler 2.39. The Bug "Truncatig" in the PowerBASIC Helpcompiler 2.40. Crash of the PowerBASIC-IDE after calling its own Help 2.0. PowerBASIC-Errorlibraries ------------------------------ For better Security of your own programs I would recommend that you link all Errorlibraries. This is the only way to make sure that PowerBASIC shows a correct Error and not an unexplainable Error at: SELECT CASE pbvrevision You can remove all Errorlibraries in the finished program, because they are only needed in development. The $ERROR-Libraries can be linked within the IDE or directly in your Source. The Settings in the Source are used above the Settings in the IDE! The $ERROR-Libraries are linked as follows: $ERROR NUMERIC ON $ERROR OVERFLOW ON $ERROR BOUNDS ON $ERROR STACK ON Note: Some of the Bugs shown here can only be found with these Libraries linked! 2.1. The NUMERIC/OVERFLOW-Problem in PowerBASIC 3.0 --------------------------------------------------- Versions: 3.0 Known : partly removed in version 3.10 The problems shown here only apply to the use of unsigned variables and are shown with variables of type WORD: Example 1: Demo?? = &hA000 causes an Overflow, because PowerBASIC interprets this as a signed variable. This error can be solved by using a real number. Similar effects can occur with the $NUMERIC-System when using the REG()-Command: Example 2: Demo?? = REG(1) can, under special circumstances, cause an Overflow, too, if the passed value would be negative as INTEGER. This error can be solved, if only using variables of type INTEGER with REG(), by removing the NUMERIC-Library when compiling It would be much better though to trash the old BASIC-Crap and do the whole thing in InLine-Assembler right away! :-) It is also interesting to see the 'floating' of error with deactivated $ERROR NUMERIC library. The error occurs some later time in the program, strangely at variables of type WORD, too. Even stranger that you can at best see this at internal PowerBASIC variables of type WORD. Another Overflow effect is hidden behind the PowerBASIC-Functions STRSEG/STRPTR, VARSEG/VARPTR, CODESEG/CODEPTR. Unlike REG(1) the variables MUST be of type WORD, else an Overflow can occur in bigger programs. 2.2. The NUMERIC/OVERFLOW-Problem in PowerBASIC 3.1/3.2 ------------------------------------------------------- Versions: 3.1/3.2 Known : Correction recommended at PowerBASIC Inc. One shouldn't think that a new version lets the old bugs be forgotten ;-). Example 1: Demo?? = &hA000 can still cause an Overflow. This can't be demonstrated in one line anymore, because it sometimes still occurs in very complex programs. This still has not changed with version 3.20. Unlike version 3.00 this bug can be passed by using definite unsigned variables: Demo?? = &h0A000 Should you be Toolbox-Developer and want to make sure that your sources work under PowerBASIC 3.0 then enter the following lines: ! mov ax, &hA000 ! mov Demo??, ax Example 2: Demo?? = REG(1) does not cause an Overflow anymore, as far as I know, but you can't be sure about that. But one should still use variables of type INTEGER when using REG. Many PowerBASIC-Functions work better now, others still cause trouble. this affects some special routines which are only set for INTEGER variables, but still work with variables of type WORD. The Overflow problem with STRSEG/STRPTR, VARSEG/VAROTR and CODESEG/ CODEPTR is still existing. 2.3. No OVERFLOW-Error with Doublewords ---------------------------------------- | Versions: 3.0/3.1/3.2/3.5 | Known : Yes | There is no internal Overflow test for Variables of type Doubleword. | You can test this with a little example. Example: i??? = -1 PRINT i??? | The cause for this problem lies within the Intel CPU itsself, because | there is no Overflow created that the Compiler could test for. 2.4. Crash of the PowerBASIC IDE and compiled EXE's while loading ----------------------------------------------------------------- Versions: 3.0/3.1 (3.2 not tested) Known : No (partly) A Crash of the IDE while loading occurs rather rarely and can usually be traced back to one of the following: - QEMM Memorymanagementsystem (up to Version 7.03) - extremly low ammount of free Low Dos Memory - You have tried to load the IDE with the LOADHIGH-Command - 4DOS In most cases the IDE will return to the Commandline with a graphical Error (Cursor within the IDE) while loading. Also struck with this effect are all compiled PowerBASIC-EXE Files. If you want to get around this effect at any cost, you will have to compress the PowerBASIC-EXE with an EXE-Packer like PKLITE. 2.5. EXEs of different size when compiling with PB/PBC ------------------------------------------------------ This isn't really a Bug, because there is only a small difference in the cause of the IDE-Compiler and the Commandlinecompiler, which explains the differently sized EXE-Files. The IDE always compiles the EXE-File with the Settings in the IDE, meaning that if you don't want to compile the VGA-Lib into it, you set it in the IDE. The PBC always compiles the VGA-Lib into it, IF you haven't declared it differently with a Metastatement. The Metastatements are always taken before the IDE-Settings! 2.6. Different EXE-Files with same Compilation ---------------------------------------------- Versions: 3.0/3.1 Known : Seems so A nice effect can be reported, when you compile Sources more than once and then compare them with a Filecompare-Utility. If your free Memory has changed, the created EXE-Files will be different. As far as I see it, the two PowerBASIC Compilers save some Information about the system they were compiled on, which are of Integer/Word type and are at the Offset's &h9C/&hA0. (PB3.1) This effect can be shown as well in the PB-IDE as with PBC. Some say that PB-EXE-Files which were compiled under a PowerBASIC- Shell with PBC seem to crash more often. But even since I have been compiling all of my projects like this for two years, I can not approve to this effect. Version 3.0 of the PowerBASIC-Compiler SHELL seemed to cause other effects with big EXE- Files. The problems were solved back then by using an alternativ PBSHELL-Command. 2.7 Problems with the Mouse within the IDE ------------------------------------------- Versions: 3.0 Known : Seems corrected in Version 3.1 Should you work with a Mouse in the IDE, so that you can insert and cut Sorucecode easily, this could cause a partial crash when marking long texts which go past the right screen border. Furthermore the Mouse cursor does not mark the text correctly. There also seem to be some problems when using the Mouse in the 80*43/50 Mode. 2.8. The Fixup Overflow Syndrome