To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxtOpen lugnet.robotics.nxt in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / 699
698  |  700
Subject: 
Re: NBC/NXC beta news
Newsgroups: 
lugnet.robotics.nxt
Date: 
Sat, 28 Apr 2007 21:38:10 GMT
Viewed: 
19135 times
  
In lugnet.robotics.nxt, Ross Crawford wrote:
Well that technique does compile, but produces interesting results:


Sorry for not getting back with you sooner about this bug, Rosco.  Life comes at
you fast, as they say. :-)

I investigated this problem today and it looks like I've got it fixed.  There
were several bugs going on in NBC which were causing the problem(s) that people
have seen with the new struct support.  One problem was that I was leaving a
"left-hand side type" field set even after an assignment was completed and that
was confusing later bits of code which wound up thinking that the LHS was a user
defined type in situations where it definitely was not (and where there wasn't
even a LHS at all).  Another problem was that the array subscripting code was
not handling the UDT case properly so it was trying to write to the "d0"
register (signed long) rather than to the LHS user-defined type.

I have uploaded a new test release of BricxCC which now has a built-in version
of the NBC compiler in it which you can turn on via the Preferences dialog
(Compiler|NBC/NXC|Use internal compiler checkbox).  You can test the current
state of NBC code via the internal compiler.  I am working on a few more items
before I will make another NBC beta release but in the mean time you can use
BricxCC with the internal compiler option enabled to try out the fix for this
problem.

John Hansen



Message is in Reply To:
  Re: NBC/NXC beta news
 
(...) Well that technique does compile, but produces interesting results: --- #include "NXCDefs.h" struct st { string s1; int i1; } st a1[]; st v1,v2; task main() { v1.s1 = "test"; v1.i1 = 9; NumOut(0,0,v1.i1); TextOut(40,0,v1.s1); (...) (18 years ago, 25-Apr-07, to lugnet.robotics.nxt)

7 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR