hi im using chicken 3.0.0 im trying to parse a list of floats and/or
ints that come from scheme.
in the example below the floating point test:
if (C_truep( C_flonump( w ) ))
works fine but the integer test
else if (C_truep( C_fixnump( w ) ))
crashes my app. im not sure what is wrong and ive spent about an hour
trying to figure this out. aplogies if its somethig stupid that my
eyes are not seeing!
note that its the actuall test not the printf thats crashing, (if i
comment out the printf it still crashes).
int i=0;
for (; C_SCHEME_END_OF_LIST != lyst; lyst = C_u_i_cdr( lyst ) ) {
C_word w = C_u_i_car( lyst );
if (C_truep( C_flonump( w ) )) {
printf("FLO: buf[%d]=%f\n", i++, (float)C_flonum_magnitude( w ));
}
else if (C_truep( C_fixnump( w ) )) {
printf("FIX: buf[%d]=%d\n", i++, C_unfix( w ));
}
else {
}
}
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users