Jump to content

Recommended Posts

Posted (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 by edda
Posted
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...