Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#10 function call after array expression syntax error

compiler
closed-fixed
John Hansen
NXC (53)
5
2007-06-11
2007-04-21
Anonymous
No

Compiling following code causes following error
# Error: Datatypes are not compatible
... on line 16
1 #include "NXCDefs.h"
2
3 void PrintMenu(int menuindex, int startindex)
4 {
5 string arr1[][];
6 string arr2[];
7 ArrayInit( arr2, "", 1);
8 ArrayInit( arr1, arr2, 1);
9 string arr3[];
10 arr3 = arr1[0];
11 }
12
13 task main()
14 {
15 int i = 0;
16 NumOut(0,0,i);
17 }

Compiles ok after commenting line 10.

Compiled using
Next Byte Codes Compiler version 1.0.1.b28 (1.0.1.28, built Thu Apr 12 16:04:24

windows version.

Best regards.
Matvey

Discussion

  • Pavel Petrovic
    Pavel Petrovic
    2007-04-30

    Logged In: YES
    user_id=9375
    Originator: NO

    This is not a bug. NumOut() has 4 parameters, not 3. Compiler prints correct message.
    I do not understand your "Compiles ok after commenting line 10." Are you talking hex? :)
    NumOut() is on line 16. Commenting out line 10 has no effect here (at least in 1.0.1.b25).

    Pavel.

     
  • John Hansen
    John Hansen
    2007-05-01

    Logged In: YES
    user_id=661666
    Originator: NO

    Pavel,

    Actually, more recent versions of NXC have only 3 parameters for NumOut. The "clear screen" parameter was removed in beta 27. The bug to which Matvey refers has been fixed and the next beta release (b29) will include the fix.

    John Hansen

     
  • John Hansen
    John Hansen
    2007-06-11

    Logged In: YES
    user_id=661666
    Originator: NO

    Fixed in beta 29.

     
  • John Hansen
    John Hansen
    2007-06-11

    • status: open --> closed-fixed