View unanswered posts | View active topics It is currently Wed Jul 30, 2014 11:13 am






Reply to topic  [ 2 posts ] 
RobotC 3.50 bug 4 
Author Message
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post RobotC 3.50 bug 4
Here is bug #4:
Code:
typedef struct
{
    char     titleText[18];
    int      flags;
    int      numChoices;
    char     choiceTexts[16][18];
    int      choiceValues[16];
    int      currChoice;
    int      firstChoice;
    int      userChoice;
} MENU;

MENU g_menu;

void Func2(int n)
{
    nxtDisplayTextLine(0, "n=%d", n);
}

void Func1(MENU &menu)
{
    Func2((menu.currChoice - menu.firstChoice) + 1);
}

task main()
{
    g_menu.currChoice = 0;
    g_menu.firstChoice = 0;
    Func1(g_menu);
}

It gave the output:
Quote:
n=8281

It looks like this is another issue of wrong pointer indirection.


Sat Sep 15, 2012 5:37 pm
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 614
Post Re: RobotC 3.50 bug 4
Fixed for next release. THis was due to the broken oeprator precedence in the parser.


Mon Sep 17, 2012 2:51 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.