Perhaps I'm doing something wrong, but this certainly looks like a bug. When the code below is executed, note that the fractional part of thresh disappears, i.e., 59.99 becomes 59.00.
Thanks!
Phillip
--------------------------------------------------------
#include <acknex.h>
#include <default.c>
var x= 61.0, thresh= 59.99;
TEXT* out_txt= {
pos_x = 100; pos_y = 100;
font = "Arial#24bi";
strings= 10;
flags= VISIBLE;
}
function main() {
video_mode = 7; // create a program window of 800x600 pixels
screen_color.blue = 50; // and make its background dark blue
var i;
for (i=0; i<10; i++) {
str_cat_num( (out_txt.pstring)[i], "%0.2f", x);
if (x >= thresh) {
str_cat( (out_txt.pstring)[i], " >= ");
}
else {
str_cat( (out_txt.pstring)[i], " < ");
}
str_cat_num( (out_txt.pstring)[i], "%0.2f", thresh);
x-= 0.47;
}
}