Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug?
#1
I chased this down this morning and think that this might be a bug.  I am using v 3.6.0.  From what I can tell you can omit the 'Call' command when calling a Sub and passing non-array variables, but when you call a Sub and pass an array you must have the 'Call' included.  Omitting this when passing an array will generate a 'C++ compilation failed' error.

Here is sample code:

--------------------
Call test(b$())

Sub test (b$())
    Print "HI"
End Sub
--------------------


The above compiles and works....but if the first line is any of the below iterations it will generate a 'C++ compilation failed' error - and it is not caught by the IDE:

test (b$())
test (b$)

It does not matter if you DIM or DIM SHARED for b$ either - you get the same results.  Also it does not matter if the passed variable is a integer or string - you get the same results.  I like to exclude 'Call' as I think the code looks cleaner without it, but in this case it just won't work.  It appears that it is only an issue where an array is being passed to the Sub as the code below works fine:

--------------------
test (b$)

Sub test (b$)
    Print "HI"
End Sub
--------------------

Also I wonder if the IDE needs help in this area too since the 'test (b$)' line in the FIRST example calls a Sub that requires an array, but the IDE does not catch that.

Thanks to all that dedicate work to this project !!!!
Dano
Reply


Messages In This Thread
Bug? - by dano - 03-18-2023, 01:58 PM
RE: Bug? - by dbox - 03-18-2023, 02:10 PM
RE: Bug? - by dano - 03-18-2023, 02:41 PM
RE: Bug? - by dbox - 03-18-2023, 02:52 PM
RE: Bug? - by TerryRitchie - 03-18-2023, 02:11 PM
RE: Bug? - by dano - 03-18-2023, 02:39 PM



Users browsing this thread: 1 Guest(s)