2. Errors (Bug's)/Inconsistencies in PowerBASIC Versions 3.0, 3.1, 3.2 and 3.5 (Part 2)


Errors (Bug's)/Inconsistencies in PowerBASIC Versions 3.0, 3.1, 3.2 and 3.5 (Part 1)
Errors (Bug's)/Inconsistencies in PowerBASIC Versions 3.0, 3.1, 3.2 and 3.5 (Part 3)

Error 454: END FUNCTION expected

Versions: 3.0/3.1/3.2
Known : Error corrected in Version 3.50

This Bug can occur when a comment in an Inline-Assemblerline contains the ASCII- 154. Please read the previous paragraph for more information.

2.11. Another REMARK-Problem with $ALIAS

Versions: 3.0/3.1/3.2
Known : Error corrected in Version 3.50

This error ist described quite easily. When you are using $ALIAS you may not use ':' (ASCII 58) after a REMARK, because PowerBASIC interprets this as an Error 462 (Undefined SUB/FUNCTION). This Problem only occurs because of downward compatability to GWBASIC!
            $ALIAS DATA AS "_DATA"  ': Fit C-Segments to PowerBASIC
                                     causes Error 462

2.12. The mistake CDWRD in the OnLine-Help

Versions: 3.0 (only german Version)

There is a small typpo in the in the OnLine-Help. Instead of 'CDWD' (the correct Command), 'CDWRD' was written. The syntax is spelled correctly in the german manuals.
            i??? = 1
            PRINT CDWRD(i???)        : 'wrong  Syntax
            PRINT CDWD(i???)         : 'correct Syntax

2.13. The mistake CVDWRD in the OnLine-Help

Versions: 3.0 (only German Version)

This time the typpo is 'CVDWRD'. Correct Syntax is 'CVDWD'. The syntax is correct in the german manuals.

2.14. Crash when pressing CTRL-C

Versions: 3.0
Known : Error corrected in Version 3.10

This Bug is widely known and only occurs when you set the Compileroption $OPTION CNTLBREAK OFF while the BREAK-Flag in DOS is set to ON. (Usually it is set to OFF by MS-DOS). When you press CTRL-C under these circumstances your finished program will simply crash. You can get past this by locking the BREAK-Flag using your own PowerBASIC-FUNCTION. You can achieve this using the following routines:
            SHARED BreakFlag%
            FUNCTION BreakAus public
                    'Save and deactivate CTRL-BREAK Interrupt
                    ! mov ax, &h3300
                    ! int &h21
                    ! mov BreakFlag%, dx
                    ! mov ax, &h3301
                    ! mov dx, 0
                    ! int &h21
            END FUNCTION

            FUNCTION BreakReset public
                    'Restore Control-Break-Interrupt
                    ! mov ax, &h3301
                    ! mov dx, BreakFlag%
                    ! int &h21
            END FUNCTION
You can find a file named CNTL.ZIP in some BBS's, it is the official BugFix.

2.15. Error when producing Output with "CONS:" and CTRL-C

Versions: 3.0
Known : Error corrected in Version 3.10

This Error is also a cause of the CTRL-C Bug, some side effects can occur when producing Output with "CONS:". More detailed Information is not known to me personally.

2.16. The Problem with Error 244 in a Stand Alone EXE

Versions: 3.0
Known : Error corrected in Version 3.10

Should you use PowerBASIC 3.0 and work with the Inline-Assembler a lot, in connection with the two internal PowerBASIC FUNCTIONS
the above named Error 244 (Library does not exist) can occur. This Error only occurs in a Stand Alone EXE and not within the PowerBASIC- IDE. The two internal PowerBASIC FUNCTIONS must be within a PowerBASIC Unit. To get aorund this problem use STRSEG/STRPTR, temporary save them and then MOV them into the correct Processorregisters.

2.17. Problems when linking multiple Lines of Source

Versions: 3.0/3.1
Known : Error corrected in Version 3.20

The PowerBASIC-IDE as well as the Commandlinecompiler have some casual problems when you spread Sourcecode over more than one line, when it actually has to be in one line.
            C$ = CHR$( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)+_
                 CHR$( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Experience shows that in connection with bigger projects the Compiler likes the wrong interpreting of the lines. Saying: The programmer will get a strange Error somewhere in the Sourcecode. Luckily at the correct position most of the time.

2.18. Problems with the WATCH-Window and multidimensional Arrays

Versions: 3.0/3.1
Known : Problem corrected in Version 3.10

The WATCH-Window can not display multidimensional Arrays correctly.

2.19. Buggy internal Function/Variable: pbvScrnCols

Versions: 3.0/3.1/3.2
Known : No

This internal Variable should return the number of currently displayed columns on the screen. In connection with all modes that do not use the 40 or 80 column mode, an incorrect number will be returned. Such modes can be set on every VGA-Card and quite a few Tools (i. e. Disk Command Center) even support them! This little FUNCTION can solve this problem:
            DIM fixScrnCols AS BYTE
            ! mov  ah, &h0f
            ! int  &h10
            ! mov fixScrnCols, ah

2.20. Incorrect internal Function/Variable: pbvHost

Versions: 3.0/3.1/3.2
Known : No

Bit 8 is not set under Microsoft Windows(NT) 3.x

2.21. A little difference in the new Inline-ASM of V3.1/3.2

Versions: 3.1/3.2
Known : Correction demanded at PowerBASIC Inc.

This is explained quickly. While PowerBASIC 3.0 accepts the following line of Inline-Assembler code:
            ! mov ax, &h0A000
PowerBASIC 3.1/3.2 will not work with it, even if this feature is new in Version 3.1/3.2.

2.22. The dd-Problem in PowerBASIC 3.1/3.2

Versions: 3.1/3.2
Known : Feature removed in version 3.50

This feature is explained fast, because the new 32Bit &h...., &o...., &b Statements are taken as common knowledge. PowerBASIC Inc. simply forgot their implementation into the Inline-Assembler!! You don't believe me? Then just try the following:
            ! dd &h12345678
This little problem was explained by PowerBASIC Inc. using the 8Bit Inline Assembler, but the Inline-Assembler of Version 3.5 was fixed in these ways.

2.23. Undocumented internal Variables in PowerBASIC 3.0/3.1/3.2

The following internal Variables already exist in PowerBASIC 3.0, but are not documented:
The following internal Variables are not documented from Version 3.1 on, but still exist:
The position of the Datasegments are identical in PowerBASIC 3.0 and PowerBASIC 3.1/3.2.

2.24. The PRINT-Bug in PowerBASIC 3.2

Known : ????

In Version 3.2 of PowerBASIC Variables of type DWORD are not printed correctly with PRINT:
            Demo??? = 1234567890
            PRINT Demo???
causes the following output:
    PowerBASIC 3.0/3.1: 1234567890
    PowerBASIC 3.2    : 1.234568+E
Using PRINT USING can help here...

Errors (Bug's)/Inconsistencies in PowerBASIC Versions 3.0, 3.1, 3.2 and 3.5 (Part 1)
Errors (Bug's)/Inconsistencies in PowerBASIC Versions 3.0, 3.1. 3.2 and 3.5 (Part 3)

(c) 1996/2007 by Thomas Gohel, All rights and bugs reserved
(c) 1996/1998 by Thomas Geiger, english version