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

Home » Public Forums » archive » printing structure values on one line
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: printing structure values on one line [message #304 is a reply to message #303] Wed, 01 July 1992 07:55 Go to previous messageGo to previous message
knight is currently offline  knight
Messages: 37
Registered: January 1992
Member
In article <1992Jul1.142422.21291@ll.mit.edu>, knight@ll.mit.edu (Fred Knight) writes:
|>
|> In article <1992Jul1.140033.20864@ll.mit.edu>, knight@ll.mit.edu (Fred Knight) writes:
|> |>
|> |> For an application that wants card images (Lowtran), I want to print
|> |> the values of a structure
|> |> without the {}'s
|> |> and
|> |> on one line.
|> |>
|> |> Here's an example of the problem.
|> |>
|> |> IDL> t={a:0.,b:0.,c:0.}
|> |> IDL> print,t
|> |> { 0.00000 0.00000 0.00000}
|> |> IDL> print,t,format='(3f10.2)'
|> |> 0.00
|> |> 0.00
|> |> 0.00
|> |>
|> Here's one solution:
|> IDL> print,string(t,format='(3f10.2)')
|> 0.00 0.00 0.00
|>
|> However, I still think the print should give the same result.
|>
But there's a bug in string! Count the characters in the second and third
fields: there are 11 not 10! The first field is correct but the rest have
one extra blank.

Fred
--
=Fred Knight (knight@ll.mit.edu) (617) 981-2027
C-483\\MIT Lincoln Laboratory\\244 Wood Street\\Lexington, MA 02173
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: CALL_EXTERNAL: accessing global variables from IDL
Next Topic: char orientation

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

Current Time: Wed Oct 08 19:19:37 PDT 2025

Total time taken to generate the page: 0.00494 seconds