Search found 68 matches: detection

Return to advanced search

Re: Decimal detection

Marc, I should have included this in my previous message. Below is the info for the Round() function from the Clipper manual. Depending on the real accuracy of the numbers you are converting, this should be used to get the proper whole number for your translation. James ROUND() Return a numeric valu...
by James Bott
Sat Oct 09, 2021 7:12 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Decimal detection
Replies: 10
Views: 1163

Re: Decimal detection

Marc, ... '122.00000' returns '122.' I should point out that technically 122.00000 is not the same as 122. "122.00000" implies that it is accurate to the nearest 5th decimal place (one hundred thousandth of a unit). And 122 implies it is accurate to the nearest whole number. I know that da...
by James Bott
Sat Oct 09, 2021 6:53 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Decimal detection
Replies: 10
Views: 1163

Re: Decimal detection

Code: Select all  Expand view
cNumToStr( nVal, [lEuropean], [lThouSep] )

2nd and 3rd parameters default to settings by FWNumFormat(...)
by nageswaragunupudi
Mon Sep 27, 2021 11:00 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Decimal detection
Replies: 10
Views: 1163

Re: Decimal detection

Nages, cNum := cNumToStr( nValue, .f., .f. ) Wow, one line, I like that! Less is more. I note that in my version of FWH 1805, it is not listed in the documentation, but the function is in version 1805. You might want to check to make sure it is in the documentation for the latest version. Please tel...
by James Bott
Mon Sep 27, 2021 10:47 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Decimal detection
Replies: 10
Views: 1163

Re: Decimal detection

Code: Select all  Expand view

cNum := Str( .... )
cTrim := If( "." $ cNum, RemRight( RemRight( cNum, "0" ), "." ), cNum )
 


OR
Simply use the FWH built-in function
Code: Select all  Expand view

cNum := cNumToStr( nValue, .f., .f. )
 

instead of using cNum := Str( nValue )
by nageswaragunupudi
Mon Sep 27, 2021 9:43 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Decimal detection
Replies: 10
Views: 1163

Re: Decimal detection

Marc, Here it is with the new revisions you mentioned. James /*Purpose  :  Reformat number in string formatProgram  : Author   : James Bott, jbott@compuserve.comDate     : Company  : IntellitechLanguage : Fivewin/xHarbourUpdated  : Notes    :*/#include "fivewin.ch"Function Main()  ...
by James Bott
Mon Sep 27, 2021 8:30 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Decimal detection
Replies: 10
Views: 1163

Re: Decimal detection

James, Francisco,

Thank you, they both are working fine.
The only thing was that if there was a value without decimal digits it returns the value with a dot.

Like '122.00000' returns '122.'

I will optimize it with testing if the return-value ends with '.', if so, I will return it without the '.'
by Marc Vanzegbroeck
Mon Sep 27, 2021 7:24 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Decimal detection
Replies: 10
Views: 1163

Re: Decimal detection

function RemoveRightZeros(cString)  local nPos := 0, n, nLen := Len(cString)  if ValType(cString) <> "C"     MsgStop("El valor recibido debe ser del tipo Cadena de texto", "Alto")     Return ""  endif  FOR n := 1 TO nLen ...
by FranciscoA
Mon Sep 27, 2021 5:57 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Decimal detection
Replies: 10
Views: 1163

Re: Decimal detection

Code: Select all  Expand view
Function RemoveZeros( cValue )
   do while right(cValue,1) = "0"
      cValue:= left(cValue, len(cValue) -1)
   enddo
Return cValue
by James Bott
Mon Sep 27, 2021 4:34 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Decimal detection
Replies: 10
Views: 1163

Re: Decimal detection

Hi.
WhatsNew Fwh2106 contains this:
* Función FW_ExcelToDBF(): Elimina los ceros a la derecha después del decimal al
convertir números a texto.

Maybe it can help you.
Regards
by FranciscoA
Mon Sep 27, 2021 4:13 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Decimal detection
Replies: 10
Views: 1163

Decimal detection

Hi, I want to convert some values from a database to a text file for export use. Normaly a use str() to convert the value. The problem is that if the field is define with 5 Decimals, and the value is 4.204, the export is 4.20400. Then I can use something like str(10,3). Is there a easy way to know t...
by Marc Vanzegbroeck
Mon Sep 27, 2021 1:22 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Decimal detection
Replies: 10
Views: 1163

Re: Border around GET

Here is a preview of the new release ( looks much different ) many things are added like a detection of the needed textcolor like contrast used in xBrowse You can select a background and a wanted border-color, a defined border-distance and much more like You can see ...
by ukoenig
Sun May 30, 2021 8:03 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Border around GET
Replies: 46
Views: 13694

Re: Are there any Treeview samples with associated edit boxes?

... I'll play with some Export/Save As routines, as this proceeds. This is has some real potential, Antonio. Class TXmlDocument() provides XML error detection support, so we have already included it: https://github.com/FiveTechSoft/FWH_tools/blob/master/pim.zip Silvio, now you can check ...
by FWExplorer
Sat Nov 28, 2020 1:54 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Are there any Treeview samples with associated edit boxes?
Replies: 44
Views: 4837

Re: Are there any Treeview samples with associated edit boxes?

Class TXmlDocument() provides XML error detection support, so we have already included it:
https://github.com/FiveTechSoft/FWH_tools/blob/master/pim.zip

Silvio, now you can check the error in your XML file! Anyhow, we get the error description but no idea what the error is yet :-)
by Antonio Linares
Sat Nov 28, 2020 1:14 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Are there any Treeview samples with associated edit boxes?
Replies: 44
Views: 4837

Auto-Close Application On Timer (Resolved)

... I would like to set a timer to 60 minutes or more, automatically close the application if the user does not interact with the application, upon detection of no keyboard input and no mouse movement. I have auto-backup routines and various data updates to execute, but the procedure fails due to ...
by RiazKhan
Fri May 01, 2020 11:28 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Auto-Close Application On Timer (Resolved)
Replies: 9
Views: 1323
Next

Return to advanced search

cron