Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format function and masks

Status
Not open for further replies.

nnzz

Programmer
Feb 26, 2001
8
0
0
ES
Hello, I've got the next problem:

I read double numbers from a file, then format the to scientific notation using the format function in this way:

format(number, mask)

mask is:
&quot;0.00···0&quot; if Len(number) < X
or
&quot;0.00···E00&quot; if Len(number) > X

The thing is, in my computer everything is ok, but in all other computers I try, when Len(number)< X, i.e. mask is &quot;0.00···0&quot;, I obtain a different scale for the number,

for example:
In my PC, Format(&quot;0.123&quot;, &quot;0.000000&quot;) -> 0.123000
In another PC, Format(&quot;0.123&quot;, &quot;0.000000) -> 1.230000

What is happening? Why Format() behaves different in differetn PC's?

Thamk you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top