comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Output file with string blanks and float
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Output file with string blanks and float [message #90874] Sun, 03 May 2015 01:26 Go to previous message
Miguel is currently offline  Miguel
Messages: 18
Registered: April 2015
Junior Member
Hi,

I'm trying to create an output file with these specific conditions :

1) If the result is negative, the corresponding output is a blank
2) If the result is ok, the output is a number with a specific number of decimal

For example, I have this initial output

-1 2.312 54.124
547.5460 -1.0 65.321

And I want

2.31 54.12
547.55 65.32

For the blank, I convert each line into a string array and I put "String(Replicate(32B, 8))" to create a blank with specific width.
However, if I convert into a string array, I cannot use the format F[w].[d] to specify the number of decimal.

I thought I could use STRNSIGNIF but the number of decimal won't be the same for each numbers.

Do you have an idea to have the output file with these two conditions ?
Is this possible to create a blank in float and not in string format ?

Thanks

Miguel
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Mapping southern in Northern map
Next Topic: counting points falling inside a Voronoi cell

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:58:16 PDT 2025

Total time taken to generate the page: 0.00186 seconds