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

Home » Public Forums » archive » forloops
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
forloops [message #20083] Wed, 17 May 2000 00:00 Go to next message
Hamid Kohen is currently offline  Hamid Kohen
Messages: 5
Registered: March 2000
Junior Member
Hi,

I hate using forloops; does anyone know a better way of implementing the
following code without forloops?

Thanks in advance


for column = 0, size1(1) -1 do begin
for row = 0, size1(2) -1 do begin ;
print, '-------------------------'
print, b
end
end
Re: forloops [message #20170 is a reply to message #20083] Thu, 18 May 2000 00:00 Go to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
From way of Hamid wrote:
>
> Hi,
>
> I hate using forloops; does anyone know a better way of implementing the
> following code without forloops?
>
> Thanks in advance
>
> for column = 0, size1(1) -1 do begin
> for row = 0, size1(2) -1 do begin ;
> print, '-------------------------'
> print, b
> end

Sure.

print, rebin( b, size1(2) -1, size1(1) -1 )

All your code above does is print b over and over again - why clutter it
all up with the '----------------' string?? :o)

paulv

p.s. apologies for the frivolity, but it's not coffee-time yet....sigh.
--
Paul van Delst Ph: (301) 763-8000 x7274
CIMSS @ NOAA/NCEP Fax: (301) 763-8545
Rm.202, 5200 Auth Rd. Email: pvandelst@ncep.noaa.gov
Camp Springs MD 20746
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Pretty-printing IDL code? [NASSI Shneiderman Diagrams]
Next Topic: Creating directories ?

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

Current Time: Wed Oct 08 15:07:58 PDT 2025

Total time taken to generate the page: 0.00575 seconds