View unanswered posts | View active topics It is currently Sat Oct 25, 2014 7:16 am






Reply to topic  [ 2 posts ] 
RobotC 3.51 bug 12 
Author Message
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post RobotC 3.51 bug 12
This may be related to some bugs I filed previously. Nevertheless, it is different enough that I will file it just in case it's new.
Code:
typedef struct
{
    int n1;
    int n2;
} OBJ;

OBJ g_obj1;
OBJ g_obj2;

void Func1(OBJ &obj)
{
    if (&obj == &g_obj1)
    {
        nxtDisplayTextLine(0, "obj1[%d, %d]", obj.n1, obj.n2);
    }
    else if (&obj == &g_obj2)
    {
        nxtDisplayTextLine(1, "obj2[%d, %d]", obj.n1, obj.n2);
    }
    else
    {
        nxtDisplayTextLine(2, "Pointer mismatch!");
    }
}

task main()
{
    g_obj1.n1 = 1;
    g_obj1.n2 = 2;
    g_obj2.n1 = 3;
    g_obj2.n2 = 4;
    Func1(g_obj1);
    Func1(g_obj2);
}

When running the code, I got "Pointer mismatch!" as the output.
I am expecting the output:
Code:
obj1[1, 2]
obj2[3, 4]


Fri Oct 05, 2012 7:27 pm
Profile
Site Admin
Site Admin

Joined: Wed Jan 24, 2007 10:42 am
Posts: 613
Post Re: RobotC 3.51 bug 12
This issue has been resolved and will be fixed with the 3.52 Release.

_________________
Timothy Friez
ROBOTC Developer - SW Engineer
tfriez@robotc.net


Mon Oct 08, 2012 8:59 am
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.