Author Topic: BUG in IDE sub/function display  (Read 2893 times)

0 Members and 1 Guest are viewing this topic.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
BUG in IDE sub/function display
« 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.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

FellippeHeitor

  • Guest
Re: BUG in IDE sub/function display
« Reply #1 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.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: BUG in IDE sub/function display
« Reply #2 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.

Offline luke

  • Administrator
  • Seasoned Forum Regular
  • Posts: 324
    • View Profile
Re: BUG in IDE sub/function display
« Reply #3 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.