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

Home » Public Forums » archive » STRING with FORMAT keyword and REFORM
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
STRING with FORMAT keyword and REFORM [message #46919] Wed, 11 January 2006 07:11
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Hello All,

I just bumped into a funny thing. When calling

result = STRING(array, FORMAT = '(something'))

a 2d array is reformed into a 1d array.

Here's an example...

print, !VERSION
;{ ppc darwin unix Mac OS X 6.2 Jun 20 2005 32 32}


number = REBIN(INDGEN(1,10), 10,10)
text = STRING(number, FORMAT = '(I2.2)')
help, number, text

;NUMBER INT = Array[10, 10]
;TEXT STRING = Array[100] <<<<< reformed, nuts!


text = STRING(number)
help, number, text
;NUMBER INT = Array[10, 10]
;TEXT STRING = Array[10, 10] <<<< not reformed


text = STRING(text, format = '(I2.2)')
help, number, text

;NUMBER INT = Array[10, 10]
;TEXT STRING = Array[100] <<< still reformed


I can re-reform the array, but nothing pops out at me from the online
help about this. Is this expected behavior?

Thanks,
Ben
[Message index]
 
Read Message
Previous Topic: Changing the title of a postscript output file
Next Topic: Re: STRING with FORMAT keyword and REFORM

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

Current Time: Wed Oct 08 11:32:58 PDT 2025

Total time taken to generate the page: 0.00379 seconds