Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
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 ((..-' (< _ ;_..__ ; `'
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 ************************************************
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
> 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.
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 ((..-' (< _ ;_..__ ; `'