self programming IDL needed? [message #7355] |
Mon, 11 November 1996 00:00  |
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 #7441 is a reply to message #7355] |
Tue, 12 November 1996 00:00   |
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 #7483 is a reply to message #7355] |
Fri, 15 November 1996 00:00  |
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 ((..-' (< _ ;_..__ ; `'
|
|
|