Re: Array concatenations limit? [message #9369] |
Wed, 18 June 1997 00:00 |
rivers
Messages: 228 Registered: March 1991
|
Senior Member |
|
|
> From the email I have received so far, it appears that there is no way
> to define a constant vector or array of arbitrary size like you would do
> in fortran or C unless you make use of tricks like the one described
> above. It is still not satisfactory.
A minor point, many FORTRAN compilers have a limit on the number of
continuation lines, so you have a similar problem to IDL.
> Does this limitation still exist in IDL 5? (I am using IDL 4.0.1)
Yes, I just tested it and I got an error if I tried to use the array
concatentation operator on more than 90 array elements.
____________________________________________________________
Mark Rivers (773) 702-2279 (office)
CARS (773) 702-9951 (secretary)
Univ. of Chicago (773) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars.uchicago.edu (e-mail)
or:
Argonne National Laboratory (630) 252-0422 (office)
Building 434A (630) 252-0405 (lab)
9700 South Cass Avenue (630) 252-1713 (beamline)
Argonne, IL 60439 (630) 252-0443 (FAX)
|
|
|
Re: Array concatenations limit? [message #9372 is a reply to message #9369] |
Wed, 18 June 1997 00:00  |
Philippe Peeters
Messages: 14 Registered: April 1996
|
Junior Member |
|
|
R. Bauer wrote:
>
> You are not alone whith this problem.
>
> Here is the workaround!
>
> You can open a file and write strings from an idlprocedure or define by
> hand like:
>
> ;include batch file for program: xyz.pro
> g=fltarr(299)
> g(0)=1
> g(1)=2
>
> and so on.
>
> This file is like an idl include file and could be included by @
>
> @ must be on the first column.
>
From the email I have received so far, it appears that there is no way
to define a constant vector or array of arbitrary size like you would do
in fortran or C unless you make use of tricks like the one described
above. It is still not satisfactory.
Does this limitation still exist in IDL 5? (I am using IDL 4.0.1)
--
Philippe Peeters
------------------------------------------------------------ --------------
Belgian Institute for Space Aeronomy | Tel : +32-2-373.03.81
Institut d'Aeronomie Spatiale de Belgique| Fax : +32-2-374.84.23
3 Avenue Circulaire | Email :
Philippe.Peeters@oma.be
B-1180 Brussels, Belgium |
|
|
|
Re: Array concatenations limit? [message #9387 is a reply to message #9369] |
Tue, 17 June 1997 00:00  |
R. Bauer
Messages: 137 Registered: November 1996
|
Senior Member |
|
|
Philippe Peeters wrote:
>
> Hi all,
>
> I would like to define a constant vector of 299 elements with something
> like
>
> g=[1,2,3,...] ; 299 floats values
>
> during execution, IDL complains with the error message
> 0.006,0.006,0.006,0.005,0.005,0.005,0.005,0.004,0.004,0.004, 0.004,$
> ^
> % Program code area full.
>
> The manual says that there is a limit to the number of elements in array
> concatenation. It should be at least 25 but the maximum is dependent of
> the .SIZE defined. I have tried to increase the code and data size with
> no luck.
> Eventually I have cut the initial vector into pieces like this
> g=[1,2,3,...]
> g=[g,4,5,6,...]
> g=[g,7,5,6,...]
> etc...
>
> This is really ugly. Is there any workaround to this stupid limit?
You are not alone whith this problem.
Here is the workaround!
You can open a file and write strings from an idlprocedure or define by
hand like:
;include batch file for program: xyz.pro
g=fltarr(299)
g(0)=1
g(1)=2
and so on.
This file is like an idl include file and could be included by @
@ must be on the first column.
That's all
regards
R.Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
|
|
|
Re: Array concatenations limit? [message #9390 is a reply to message #9387] |
Tue, 17 June 1997 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Philippe Peeters writes:
> I would like to define a constant vector of 299 elements with something
> like
>
> g=[1,2,3,...] ; 299 floats values
>
> during execution, IDL complains with the error message
> 0.006,0.006,0.006,0.005,0.005,0.005,0.005,0.004,0.004,0.004, 0.004,$
> ^
> % Program code area full.
>
> The manual says that there is a limit to the number of elements in array
> concatenation. It should be at least 25 but the maximum is dependent of
> the .SIZE defined. I have tried to increase the code and data size with
> no luck.
> Eventually I have cut the initial vector into pieces like this
> g=[1,2,3,...]
> g=[g,4,5,6,...]
> g=[g,7,5,6,...]
> etc...
>
> This is really ugly. Is there any workaround to this stupid limit?
Upgrade to IDL 5.0. :-)
Supposedly all the limits of this sort have been eliminated
in the new version.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Customizable IDL Programming Courses
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
IDL 5 Reports: http://www.dfanning.com/documents/anomaly5.html
|
|
|