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

Home » Public Forums » archive » Re: having a routine .compile something?
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: having a routine .compile something? [message #47731] Wed, 22 February 2006 08:33
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
Hi,

as far as EXECUTE is concerned, you can execute multi-line commands (like
loops) in single-line format :-), for example (matrix transpose):

x=execute('n=5 & a=lindgen(n,n) & print, a & for i=1,n-1 do begin &' +$
'tmp=a[i,0:i-1] & a[i,0:i-1]=a[0:i-1,i] & a[0:i-1,i]=tmp &' +$
'endfor & print & print, a')

regards,
lajos


On Wed, 22 Feb 2006, Michael A. Miller wrote:

> ... But now I want to go and add multi-line commands to my
> saved file, like loops and such. Then I cannot use EXECUTE to
> execute these commands, ...
[Message index]
 
Read Message
Previous Topic: How to call an IDL procedure from a DLM
Next Topic: Question about defining a structure (in the field of image processing and pattern recognition)

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

Current Time: Fri Oct 10 20:30:01 PDT 2025

Total time taken to generate the page: 0.32570 seconds