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

Home » Public Forums » archive » self programming IDL needed?
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
self programming IDL needed? [message #7355] Mon, 11 November 1996 00:00 Go to next message
alpha is currently offline  alpha
Messages: 49
Registered: September 1996
Member
Hello,

on my adventures with execute I discoverd:

it only accepts 65 commas (ie parameters) in its string

i tried execute("print,a,a,a,a,a,a,......") for this.

if you use a variable for the content it may be different,
i will have to research...

the limit 131 chars is not found on IDL 4.0.1. I successfully
processed strings of the length 1738 chars.

----------------------
to my questions

i want to define a REALLY NEW variable (names depends on other
variables!

Imagine:

i=0L
for i=1,20 do begin
a="testname_"+string(i)
b=a+'=findgen(i)'
out=execute{b}
endfor
help
print,"well? all vars defined?"

It is obvious that i CANNOT declare the variable names eg with another
execute... (watch out for the warning in execute-manpage)

My idea in this was to programm a new file with idl in front...:

openw,lun,"dyndef.pro"
printf,lun,"pro dyndef"
for i=1,20 do begin
printf,lun,"testname_"+string(i)+"=BYTE(0)
endfor
printf,lun,"exit"

; now call my dynamic definitions procedure...
dyndef



will this work our is there a more elegant way to declare the vars?

any hint wanted...

Panther/Hendrik

--
Panther in the Jungle __..--''``\--....___ _..,_
-BELIEVE AND DECEIVE- _.-' .-/"; ` ``<._ ``-+'~=.
http://www.ang-physik _.-' _..--.'_ \ `(^) )
.uni-kiel.de/~hendrik ((..-' (< _ ;_..__ ; `'
Re: self programming IDL needed? [message #7439 is a reply to message #7355] Tue, 12 November 1996 00:00 Go to previous messageGo to next message
Christian Soeller is currently offline  Christian Soeller
Messages: 46
Registered: August 1996
Member
MICHEL KRUGLANSKI <M.Kruglanski@oma.be> writes:

>> ; now call my dynamic definitions procedure...
>> dyndef
>
> I think that it will work only once.
> The second time, the dyndef procedure will not be re-compiled;
> the old definition will be used by IDL. So you need to create
> each time a new name for the procedure

What about using
RESOLVE_ROUTINE, 'dyndef'

before you call dyndef, as the refrence says:

The RESOLVE_ROUTINE procedure compiles user-written or library
procedures or functions, given their names. Routines are compiled even
if they are already defined (!!!). This procedure is similar to the .COMPILE
executive command, but can be invoked within procedures and functions.

Maybe that will do it ?

Christian

------------------------------------------------------------ --------
Christian Soeller mailto: csoelle@sghms.ac.uk
St. Georges Hospital Medical School Dept. of Pharmacology
Cranmer Terrace London SW17 0RE
Re: self programming IDL needed? [message #7441 is a reply to message #7355] Tue, 12 November 1996 00:00 Go to previous messageGo to next message
MICHEL KRUGLANSKI is currently offline  MICHEL KRUGLANSKI
Messages: 14
Registered: August 1996
Junior Member
> My idea in this was to programm a new file with idl in front...:
>
> openw,lun,"dyndef.pro"
> printf,lun,"pro dyndef"
> for i=1,20 do begin
> printf,lun,"testname_"+string(i)+"=BYTE(0)
> endfor
> printf,lun,"exit"
>
> ; now call my dynamic definitions procedure...
> dyndef
>
>
>
> will this work our is there a more elegant way to declare the vars?
>
> any hint wanted...

I think that it will work only once.
The second time, the dyndef procedure will not be re-compiled;
the old definition will be used by IDL. So you need to create
each time a new name for the procedure

Michel K.
Re: self programming IDL needed? [message #7447 is a reply to message #7355] Mon, 11 November 1996 00:00 Go to previous messageGo to next message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Andy Loughe <afl@cdc.noaa.gov> writes:

> Hendrik Roepcke wrote:
>>
>> the limit 131 chars is not found on IDL 4.0.1. I successfully
>> processed strings of the length 1738 chars.
>
> Wow!
> Now I am really ready for the IDL Expert Programmers meeting! ;-)

I've been told not to show up. Getting old, they said. Make room for
the young bucks. :-(

David

*************************************************
* David Fanning, Ph.D.
* 2642 Bradbury Court, Fort Collins, CO 80521
* Phone: 970-221-0438 Fax: 970-221-4762
* E-Mail: davidf@dfanning.com
*
* Sometimes I go about pitying myself, and all along my
* soul is being blown by great winds across the sky.
* -- Ojibway saying
************************************************
Re: self programming IDL needed? [message #7483 is a reply to message #7355] Fri, 15 November 1996 00:00 Go to previous message
alpha is currently offline  alpha
Messages: 49
Registered: September 1996
Member
davidf@dfanning.com (David Fanning) writes:
> Andy Loughe <afl@cdc.noaa.gov> writes:
>> Hendrik Roepcke wrote:
>>> the limit 131 chars is not found on IDL 4.0.1. I successfully
>>> processed strings of the length 1738 chars.
>> Wow!
>> Now I am really ready for the IDL Expert Programmers meeting! ;-)
> I've been told not to show up. Getting old, they said. Make room for
> the young bucks. :-(

Who will be the person getting the FIDL (or was ist FUDDLE?) AWARD!

you could open the envelope , David...

Panther

--
Panther in the Jungle __..--''``\--....___ _..,_
-BELIEVE AND DECEIVE- _.-' .-/"; ` ``<._ ``-+'~=.
http://www.ang-physik _.-' _..--.'_ \ `(^) )
.uni-kiel.de/~hendrik ((..-' (< _ ;_..__ ; `'
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL and GDF
Next Topic: Re: Writing mpeg from IDL (pseudo_to_true included)

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

Current Time: Wed Oct 08 20:02:10 PDT 2025

Total time taken to generate the page: 0.00865 seconds