Floating point problem on UDOO (Due) - IDE 1.5.4

I tried some FP math on UDOO without success.
Here is a simple test which doesn’t work too.

sketch_dec28b (18.2 KB)

-dev-ttymxc3_014.png

PLEASE PLEASE don't post screenshots of your code, post the actual code,
we need to copy/paste it to test it....

Read the sticky threads about how to use this forum.

Ok, here it is.

float x = 123.45;
int y=0;
int z=123;

void setup() {
  Serial.begin(115200);
  delay(4000);
  Serial.println("Start...");

}

void loop() {
  Serial.println(z); 
  y = int(x);
  Serial.println(y); 
  delay(1000);
}

Thanks

Nothing wrong with that example for me, tried on Due 1.5.4, Mega 1.0.5, both
run fine.

Perhaps your USB->serial link is dropping out - loose the delays and see what happens.

y = int (x); // integer like in Basic?
or
y = (int) x;
??

In my Duemilanove it works too. The problems I have are on UDOO.

Claus:
In my Duemilanove it works too. The problems I have are on UDOO.

It works on the Due, sounds like an UDOO issue, do they have a forum?