QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: SMcNeill on November 03, 2018, 06:46:31 pm

Title: BUG in IDE sub/function display
Post by: SMcNeill on November 03, 2018, 06:46:31 pm
If you load my SaveImage.BI file, you'll notice that we have two declare library seconds with the same function/sub names, which the precompiler chooses which one to load according to whether we're using QB64x32 or QB64x64.

The bug/glitch is the sub/function display shows both sets of names, giving duplicates in the listing.

For example:

$IF 32BIT THEN
    DECLARE LIBRARY "whatever32"
         SUB example
    END DECLARE
$ELSE
    DECLARE LIBRARY "whatever64"
        SUB example
    END DECLARE
$END IF

And, the sub/function view would list example twice.
Title: Re: BUG in IDE sub/function display
Post by: FellippeHeitor on November 03, 2018, 08:46:25 pm
I wouldn't label it a bug because it's not something that's been coded to work a certain that's misbehaving; it's doing exactly as intended, especially cause we're just checking for instances of SUB/FUNCTION outside comments and quotes.
Title: Re: BUG in IDE sub/function display
Post by: Petr on November 04, 2018, 04:42:49 am
I would say that this is the analogy of the problem I encountered when I needed to change the data type as needed. When reading WAV files, a record of either _UNSIGNED _BYTE or INTEGER, or LONG, or SINGLE. Also, you can not enroll

SELECT CASE Music_type
CASE 8bit: DIM S AS _UNSIGNED _BYTE
CASE 16bit: DIM S AS INTEGER
CASE 24bit: DIM S AS LONG
CASE 32bit: DIM S AS SINGLE
END SELECT

although it would make it easier for you to work, it would not be compatible with QB4.5

But if it can be done somehow (so S was the type as needed, so please give a sample here). Thank you.
Title: Re: BUG in IDE sub/function display
Post by: luke on November 04, 2018, 05:28:01 am
QB64 is statically typed. For the case of reading audio data, just normalise it on read so that all samples are floating point.