o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

Rounding Up and Down Conditionally -

I have a need to do conditional rounding. I need to check to see if a variable is an integer. If it is, do nothing BUT if it's not, round down to the next whole number. How can I check to see if a variable is an integer? Thanks, Jeremy

 

Rounding Up and Down Conditionally -
I have a need to do conditional rounding. I need to check to see if a variable is an integer. If it is, do nothing BUT if it's not, round down to the next whole number. How can I check to see if a variable is an integer? Thanks, Jeremy


Conditionally call <php > code -
Can I have php code existing in a file, but the code between the tags only gets called conditionally (say, when a javascript button is pressed)? I want to set a PHP SESSION variable only if a button is pressed.


keep from rounding -
I have some formulas outputting to a text box. The numbers keep rounding up. How do I stop this?


Rounding Numbers in VB -
are you rounding or just truncating? your example of 100.956 should round to 100.96 not 100.95 serge's code rounds which is not what your example shows


Help: Rounding problem ! -
Hi, I have an application and that give me rare rounding problem. The statement I use to rounding the value x = x + round((w * y), 2) it loop through 4 records, only two record get rounded corrrectly and the other two is not, I have no idea why. Original value Aft


can i Abort a control event -
hi all, can i conditionally during runtime make a certain control don't respond to some events ( such as mouse click ). i know i can always set the .enabled = false , but that will disable the control along with it's all events. also i know that i can check for some criteri


help my numbers are rounding off -
i'm doing a order form, they only problem i am having is my output, all the numbers are rounding off instead of showing decimals, here is my code if someone wants to look at it and tell me what i'm dong wrong, thanks.


Rounding Numbers Within A Textbox -
Hi, Im fairly new to vb.NET, The problem I have is that I want to round a number down instead of it being rounded up. I want to round 10.389 to 10.38 instead of it rounding to 10.39, is this possible? thanks in advance.


C++ automatically rounding off values -
how to resolve the case of c++ rounding off values, for example: cos(6.2832) i get 1 instead of .99999 and 0.1 being only 0... what should i do


stop rounding up -
I have some formulas outputting to a text box. The numbers keep rounding up. How do I stop this?


Silly question (Rounding) -
Have searched as always but it appears all the rounding done if for numbers like 10.34354 etc I need to round off to the nearest 10 but not least, example 10 would stay as 10 11 would be 20 3 would be 10 22 would be 30 Thanks in advance


Round function Question -
Dear all, I have a question about round function in VB. General Speaking, the round function is quite simple: round(10.123567,3) will return 10.124 which I believe it is using half-adjust rounding method. But right now, I need to have a rounding method function to help me rou


Rounding Problem -
Im using Visual Basic 6 and access 97 When i put a value in the textbox, for exemple 0.5 when writes this value in the database table apears 0. I think its a rounding problem, how can i solve this problem? Thanks in advance!


Problem with rounding a number! -
In real life, When we try to round a number, let say 3.825, up to 2 decimal points, the answer is 3.83, right? Unfortunately in VB .NET, the "Math.Round" method & "Decimal.Round" method, round number like this (Read the remarks I quote from the Help file m


cell rounding of value automatically -
Hello i am working on this worksheet, and it is rounding off the value in certain cells automatically. e.g. if i have a value 2.98 in cell c3 and i make the value of the cell in question say c56 =c3 it gives a value of 3 actually i discovered that the cell does not like any fr


Easy date/time rounding Q. ***RESOLVED*** -
Hi I'm trying to find the most efficient way of rounding time values to the nearest hour. Eg "19:41:00" should read "20:00:00" Any pointers anyone? Thanks in advance.


Rounding numbers to 2 decimal places - how to (Rounding) -
I am returning math to a variable (and/or a text box) BUT I only want to have two or three decimal places, that are rounded off. I cant figure out how to round them. I've tried setting text box properties, calling 'as currency' but I dont know what else to do. Thank you.


Hundredth rounding in Euro Conversion -
Using Double variable to store numbers from math formulas, I'm not able to get the correct rounding from national currency to EURO. That is, when the result is, for instance, 37.42500 I should have my variable (formatted with ##0.00) equals to 37.43 . Instead, I get 37.42 that is wron


Rounding to nearest 25,000 -
This is not an ordinary rounding issue. Here's what I need to do. I have to round any number up to the nearest 25,000 increment. For example: 124,698 would need to round to 125,000 126,125 would need to round to 150,000 1,278,189 would need to round to 1,300,000 Anyone k


Rounding - Does it or doesn't it -
I've seen a few comments on this forum that suggest the round function only rounds to the nearest even number. Is this really the case? I've tried a few experiments and, for me at least, this doesn't appear to be true. ie: round(10.6) produces 11 (not even!) print round (11.12


Conditionally populate a ListView control -
Hi All, I am stuck to a very ridiculous problem. I need to populate a ListView control from a function of another form (that means the code will be written in a different form than the one in which the ListView control is) conditionally. The condition is that the entry should not


Rounding Error In Access Report -
Please I need help on how to eliminate rounding errors in Access report. I want the sum of values in Details to be exactly equal to the summation in the Footer. e.g. Name Contribution To-Date David 45,000.00 Samuel 45,000.00 Smith 47,000.00


Roudning (Up, Down, Truncate) -
Does .5 round to 0 or 1???? Rounding is kinda confusing. It seems some functions just truncate(Int,Fix), some round up, some round down, and some round to the closet even number(CInt,CLng). I need to make my visual basic program compatible with a perl script. Is there any way to


...............Desparate now...(beginner stuck) -
I posted a similar question yesterday. Thanks to the guys who replied, but I didn't explain myself properly. I have a number which has been input by the user. Could be anything, but normally not greater than about 10 or so, but may be up to 2 decimal points. From this number, I nee


Need a good tip -
I'm looking for a conversion program tip. This is what I have: amount 1 : 1345 count : 6 result amount : 1345 * 6 = 8070 Euro BF : 40.3399 amount2 : 1345 / Euro BF gives : 33,34 total gives : 33.34 * 6 = 200,05 However after conversion I need as result : 200,04 Probl


rounding to a specific place -
when I have cin >> dprice; get a double value and I type in 8.88, it gets immediately stored as 8.8800000000000008. Now the real questions about this would be like why does it do that, why don't they fix that, and why do people still use C++ when it does stuff like that? But my


ILMV WILL get away with it! -
My goal is to have a thread that gets no replies... but does it conditionally. So, here's the condition: Only post here if you think he'll pull it off.


MS Access 97 Database Decimal Problem -
Hi Ive created a DB for VB6 Now a field cost has the following field size : long integer format : general integer decimal places : 2 Now whatever value is being put there.. its getting rounded off.. I want it to be stored as 2 decimal places.. So eg : I want the fi


Return an Integer with no decimal without rounding! -
How do i do what the subject sayz? "Return an Integer with no decimal without rounding!"


[2005] Rounding of Digits in a Double -
Hi, Is there a easier way of rounding of a double I use the following Code: dim test1 as double test1 = math.round(a*b, 2) thanks


Order of Magnitude Rounding -
Is there a clever algorithm for rounding a number by order of magnitude? I'm trying to set the axis bounds on a chart control such that if, for example, max Y = 5637, max axis Y = 6000 min Y = 2312, min axis Y = 2000 I'd guess I'd also want to round up and down to the larges


Format function is rounding numbers -
Hey! Is there a way to format a number wirh a floating point without rounding it ? I thought using the format function (format(myNum, "#0.000")) will do the job, but for numbers with 4 digits after the floating point, is rounded....


Rounding Error Problem In Access -
I'm using Access 97 and I have been having problem with rounding error in my reports. I later found a solution to it with something like this: Sum(Int(Abs(variable)*100+0.5)/100). This worked perfectly untill the operating system (Windows XP)was reinstalled. Now the report does not com


Conditional Formatting -
First of all I am not a programmer I have no formal training so please bear with me. I have muddled through the development of an application using Front Page for Junior Football with much help from this and other forums. I thank all that have provided me guidance and assistance. Pl


Rounding Up -
Hi Iam making a Timber Rafter calculator. The Rafter is on a angle and i use cos the calculate the length. I need a procedure that will round the length up to a Stock Length. A Stock Length is the lengths of timber that is usually keep in stock/on hand. Stock Lengths start


[SQL 2000] Rounding Problem -
Hello, I have the following line in my stored procedure : Code: SET @ErrMSG = 'Employee : ' + STR(@Employee) + ' Only Has ' + STR(@AllowanceLeft) + ' days left to take.' When I debug through to the @AllowanceLeft part, it shows as 2.5000 However, this message displays it as


Double to String - how do I stop rounding -
I'm writing a conversion program that requires a fairly high degree of accuracy. I am trying to information about a raster dataset in order to make a header file for an ER Mapper raster. The problem is this, some of the numbers refuse to print out as they actually are. For example: I


Dynamic Array size -
I'm having problems identifying whether my array has anything in it. I conditionally build it dynamically and there may not be anything built in it. Is there a command to check if null or something like that?


**RESOLVED** Rounding to the nearest whole number -
Hi I need help! I have conducted a search on this forum and have found nothing.... what I need help with is rounding to the nearest whole number ??? i.e 1.5 becomes 2.0 1.4 becomes 1.0 etc etc Your help and time is very much appreciated


[2008] Rounding to the nearest half (0.5) -
Hey guys, I am reading the temperature of a device and the values are rounding to 1 decimal place. For example, right now it's 13.8 degrees. What I want to do is round to the nearest half of a degree, so using the 13 degree mark as an example:13.1, round to 13.0 13.2, round to 13.0