Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    New Lounger
    Join Date
    Apr 2013
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks sdckapr, that is more like it , now you mention it the INT bit comes leaping back. I shall have to dig back into history now , I clearly can't rely on memory! My guess is INT(x+.5) which should meet the convention of rounding .5 upwards.

  2. #17
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 341 Times in 334 Posts
    Yes, Int(x+.5) is the method to round to the nearest integer, when there is no round function. But it does not round to the nearest half, but to the nearest integer.

    [INT essentially "truncates" the decimal portion, so 1.5-1.99 would turn to 1, adding the 0.5 turns those values to numbers 2-2.49 so when they are truncated, the effects are to round the original number upwards to the nearest integer, not truncated]

    Steve

  3. #18
    2 Star Lounger
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    157
    Thanks
    34
    Thanked 3 Times in 2 Posts
    Thanks again,
    there is an update to this question, just waiting on some puter bits to sort out this old DOS program cos the graphics of that program don't seem work on XP.
    It's where the actual resulting calculation ought to appear, the rest of that old program works fine.
    Once I see that program's result/Sums, then I can make a comparison with excel
    I think I may have to install DOS 6 as the operating system exclusively.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •