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

Close

#31 variable declaration problem

compiler
closed-fixed
John Hansen
NXC (53)
5
2007-09-26
2007-08-30
Rupert
No

Something seems to be wrong in the algorithm which names variable in the NBC conversion. The following program

task main() {
int i;
int j;
}

Fails to compile with this error
Line 7: Error: Duplicate variable declaration (__main__7qG207qG2__000)

If the variables are named q and r, then its ok.

This is occurring with version 32 of the compiler.
Rupert B

Discussion

  • Rupert
    Rupert
    2007-09-12

    Logged In: YES
    user_id=1716703
    Originator: YES

    This seems to be fixed with version 33 of the compiler. Thanks!

    (Havent tried all the others yet.)

     
  • Logged In: NO

    Hi,

    I've tested it on my GNU/Linux nbc compiler. It works perfectly (whithout any errors).
    Are you using nbc under Windows?

    Regards.

     
  • Rupert
    Rupert
    2007-09-26

    Logged In: YES
    user_id=1716703
    Originator: YES

    Yes this was on Windows. However, seems to be fixed in version 33. I dont know why but Beta33 is NOT linked from the NBC page, however, if you download the latest test_release of Bricxcc, it is there. At least, it reports that it is version beta 33, from september rather than August.

    C:\Documents and Settings\Rupert Brooks>"c:\Program Files\BricxCC"\nbc
    Next Byte Codes Compiler version 1.0.1.b33 (1.0.1.33, built Sun Sep 9 16:29:08 C
    DT 2007)
    Copyright (c) 2006, John Hansen
    Use "nbc -help" for more information.

    C:\Documents and Settings\Rupert Brooks>

     
  • John Hansen
    John Hansen
    2007-09-26

    • status: open --> closed-fixed
     
  • John Hansen
    John Hansen
    2007-09-26

    Logged In: YES
    user_id=661666
    Originator: NO

    The windows version of the compiler had a case-sensitivity bug that was affecting the variable decoration scheme I was using in versions of the compiler prior to b33. Beta 33 will be officially released in the next few days but I have been releasing binary versions with fixes included in the test_release.zip for the Win32 platform. Other platforms were not impacted by the case-sensitivity bug.

    John Hansen