Jabaco's implementation of Format() is not fully compatible to the VB6 format.
You can use your own formatting function from the Java API as follows:
|
Jabaco Source
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
Option Explicit
Public Sub Command1_Click()
Debug.Print "1.414 " & nformat(1.414, "#.#")
Debug.Print "0.99 " & nformat(0.9937, "##.0###%")
End Sub
Public Function nformat(value As Double, Format As String) As String
' see http://download.oracle.com/javase/6/docs/api/java/text/DecimalFormat.html
Dim df As New java#text#DecimalFormat(Format)
nformat = df.format(value)
End Function
|
The format strings are described
here.
Greetings
A1880