Search found 29 matches: rounding

Return to advanced search

Re: Decimal detection

... rounds <nNumber> to the number of places specified by <nDecimals>. Specifying a zero or negative value for <nDecimals> allows rounding of whole numbers. A negative <nDecimals> indicates the number of digits to the left of the decimal point to round. Digits between five ...
by James Bott
Sat Oct 09, 2021 7:12 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Decimal detection
Replies: 10
Views: 1163

Re: Strange error making some calculations

... the result is correct. I've tried with FORTRAN too, with 2 decimals and floating point variables and the result is correct, without using rounding functions.
by Massimo Linossi
Thu Mar 22, 2018 10:18 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Strange error making some calculations
Replies: 9
Views: 1485

Re: Can TGraph do X,Y plots?

... it was a challenge to find those values since they needed to be rounded up (or down) to a reasonable number that made the chart look right. E.G. rounding 10.3 to 11 or 15 or whatever. Of course, being able to specify the ranges by overriding the internal calculations would also be useful. ------------------------------ ...
by alvaro533
Tue Mar 06, 2018 6:48 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Can TGraph do X,Y plots?
Replies: 18
Views: 5506

Re: Can TGraph do X,Y plots?

... it was a challenge to find those values since they needed to be rounded up (or down) to a reasonable number that made the chart look right. E.G. rounding 10.3 to 11 or 15 or whatever. Of course, being able to specify the ranges by overriding the internal calculations would also be useful. ------------------------------ ...
by James Bott
Tue Mar 06, 2018 5:26 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Can TGraph do X,Y plots?
Replies: 18
Views: 5506

Re: xBrowse Editing Error - numeric values rounding

Thank you. That resolves the problem.

Tim
by TimStone
Wed Sep 11, 2013 3:41 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowse Editing Error - numeric values rounding
Replies: 10
Views: 3034

Re: xBrowse Editing Error - numeric values rounding

I would call this a workaround rather than 'fix'. But this works for the time being. Please locate the line ::oEditGet := TGet():New( 0,0,{ | u | If(PCount()==0,uValue,uValue:= u ) },; in METHOD Edit( nKey ) CLASS TXBrwColumn. Just above this line, please insert...
by nageswaragunupudi
Wed Sep 11, 2013 7:01 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowse Editing Error - numeric values rounding
Replies: 10
Views: 3034

Re: xBrowse Editing Error - numeric values rounding

Mr. Rao,

I just wanted to keep this on top since you said you would be addressing the issue.

Your help is greatly appreciated.

Tim Stone
by TimStone
Fri Sep 06, 2013 10:41 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowse Editing Error - numeric values rounding
Replies: 10
Views: 3034

Re: xBrowse Editing Error - numeric values rounding

I use this code in a record editor. The left column ( element 1 of the array ) is a field name. The 2nd column ( EDITABLE ) is a value, and it could be of any data type. Thus, I couldn't set the column with a picture clause because sometimes the value is a string, or a date, or a decimal. Thanks for...
by TimStone
Wed Sep 04, 2013 3:51 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowse Editing Error - numeric values rounding
Replies: 10
Views: 3034

Re: xBrowse Editing Error - numeric values rounding

Good that you pointed this out. I have reduced your sample to this following code. function xbrnumedit()   local aData := { { "C", "String" }, { "N", 27 }, { "N", 12.34 }, { "C", "STRING&...
by nageswaragunupudi
Wed Sep 04, 2013 7:18 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowse Editing Error - numeric values rounding
Replies: 10
Views: 3034

Re: xBrowse Editing Error - numeric values rounding

James, Here is a cut down that makes it rather straight forward: METHOD TestEditRec(  ) CLASS MLSEditor  MEMVAR oBrush, oMFont    LOCAL aEdits := {}, n, nCcol, oHd2  LOCAL oERecEdt, oERec, lSaveEdits := .f.    AADD( aEdits, { "C"...
by TimStone
Tue Sep 03, 2013 11:44 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowse Editing Error - numeric values rounding
Replies: 10
Views: 3034

Re: xBrowse Editing Error - numeric values rounding

Tim,

Still, a small self-contained program would make it easier for Antonio to check and fix.

James
by James Bott
Tue Sep 03, 2013 10:08 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowse Editing Error - numeric values rounding
Replies: 10
Views: 3034

Re: xBrowse Editing Error - numeric values rounding

James, This is probably the only code I have that is actually allowing an edit in xBrowse. It may help to note that the error only occurs with Harbour / MSVC, and is fine with xHarbour / Pelles C builds. It may be that Antonio made a change in a build that he did not include in the Microsoft librari...
by TimStone
Tue Sep 03, 2013 9:07 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowse Editing Error - numeric values rounding
Replies: 10
Views: 3034

Re: xBrowse Editing Error - numeric values rounding

Tim, I don't know why this is happening, but have you tried: SET FIXED ON SET DECIMAL TO 2 I know that is supposed to be the default, but maybe the preprocessor is messing something up. Try making as small of a program as you can showing the problem--just create an array of a couple of items and a b...
by James Bott
Tue Sep 03, 2013 9:03 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowse Editing Error - numeric values rounding
Replies: 10
Views: 3034

Re: xBrowse Editing Error - numeric values rounding

Perhaps with a new title, someone will actually respond to this question ?
by TimStone
Tue Sep 03, 2013 3:46 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowse Editing Error - numeric values rounding
Replies: 10
Views: 3034

xBrowse Editing Error - numeric values rounding

In a file editor class, the following function is used to edit a single record from a file: METHOD EditRec(  ) CLASS MLSEditor  MEMVAR oBrush, oMFont    LOCAL aEdits := {}, n, nCcol, oHd2  LOCAL oERecEdt, oERec, lSaveEdits := .f.    FOR n := 1 TO LEN( ::oDbfr:aBuffer )    A...
by TimStone
Fri Aug 30, 2013 9:40 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: xBrowse Editing Error - numeric values rounding
Replies: 10
Views: 3034
Next

Return to advanced search