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

Home » Public Forums » archive » print and printf
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
print and printf [message #57686] Wed, 19 December 2007 08:00
sujian is currently offline  sujian
Messages: 10
Registered: May 2007
Junior Member
hi all,

my code:
-----------------------------
.run
openw,lun,'zhut.txt',/get_lun,width=40
myi.field8=myi.field1+myi.field4
myi.field6=myi.field8(sort(myi.field8))
printf,myi.field6(uniq(myi.field6))
free_lun,lun
end
-----------------------------
and it turns out to

PRINTF: Expression must be a scalar or 1 element array in this
context: <STRING Array[41952]>.

but if i change printf to print, myi.field6(uniq(myi.field6)) will be
displayed on the screen.

what's the other difference btw print and printf?

thanks
sukye
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Decompose a matrix
Next Topic: Re: print and printf

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

Current Time: Wed Oct 08 17:44:39 PDT 2025

Total time taken to generate the page: 0.00761 seconds