To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2550
2549  |  2551
Subject: 
More problems with floats
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 10 May 2002 09:03:25 GMT
Viewed: 
2223 times
  
When I try to compile a program containing the following function:

bool tr_guard_foo_loc2_t0() { return getVarVal(&var_foo_cl) >= 0.1; }

I get this error:

/tmp/ccyEbqnS.s: Assembler messages:
/tmp/ccyEbqnS.s:237: Error: cannot create floating-point number

Running gcc with -S gives that declaration at line 237

.LC2:
.float 9.76788634718520058494e-313

The code below seems to execute the function but this doesn't look like a
declaration of 0.1! In fact, if I type 0.5 instead of 0.1 in the source, I
still get the same declaration for LC2!

Any idea?

Note that the same error happen with de c++ demo temperatureSensor.C from
legos-0.2.6, on "const int a(t.tenths());".

Eric

--
email: eric.swalens@easynet.be
web: http://student.ulb.ac.be/~eswalens
icq: 2686881



Message has 1 Reply:
  Re: More problems with floats
 
(...) Eric, did you ever resolve this? If not, I could try to reproduce this... but I'd need two things: 1) the type of the return value of getVarVal 2) the type of the bool typedef Also, if you could run your cross compiler with the -v flag, that (...) (22 years ago, 13-May-02, to lugnet.robotics.rcx.legos)

3 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