Posted 11 Dec 2007 (edited) Hi all... Is it possible to convert Real to 16bitars Integer in some way? can i for example do it like this... L DB10.DBD0 RND T DB10.DBW4 or will it have problem with the 16 bitars int? Edited 11 Dec 2007 by edda Share this post Link to post Share on other sites
Posted 11 Dec 2007 Generally speaking - no, you can't. Share this post Link to post Share on other sites
Posted 11 Dec 2007 well sure if it fits in this area... i was just curious Share this post Link to post Share on other sites
Posted 12 Dec 2007 Well, people usually don't remember/know that the code below works well only when real_number is in range <0.0 .. 32767.0>. (OK, with RND it works well in fact for numbers in range <-0.5 .. 32767.5) but it does not change much) L real_number RND T int_number Share this post Link to post Share on other sites