[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

IDL 5.2 array definition question.



Hi,

I'm sure this is a another hoary old chestnut of a question but here
goes....

I have an IDL routine that returns the atomic weight of a requested
element - defined by symbol, name, or atomic number. I check the
validity of all these. Can somebody tell me why - in IDL 5.2 - my array
containing the valid symbol names has to be defined like:

  aw_symbol = ['H' ,'HE','LI','BE','B' ,'C' ,'N' ,'O' ,'F' ,'NE','NA', $
               'MG','AL','SI','P' ,'S' ,'CL','AR','K' ,'CA','SC','TI' ]
  aw_symbol = [ aw_symbol, $
               'V' ,'CR','MN','FE','CO','NI','CU','ZN','GA','GE','AS', $
               'SE','BR','KR','RB','SR','Y' ,'ZR','NB','MO','TC','RU' ]
  aw_symbol = [ aw_symbol, $
               'RH','PD','AG','CD','IN','SN','SB','TE','I' ,'XE','CS', $
               'BA','LA','CE','PR','ND','PM','SM','EU','GD','TB','DY' ]
  aw_symbol = [ aw_symbol, $
               'HO','ER','TM','YB','LU','HF','TA','W' ,'RE','OS','IR', $
               'PT','AU','HG','TL','PB','BI','PO','AT','RN','FR','RA' ]
  aw_symbol = [ aw_symbol, $
               'AC','TH','PA','U' ,'NP','PU','AM','CM','BK','CF','ES', $
               'FM','MD','NO','LR','RF','DB','SG','BH','HS','MT',      $
               'UUN', $
               'UUU', $
               'UUU' ]

instead of :

  aw_symbol = ['H' ,'HE','LI','BE','B' ,'C' ,'N' ,'O' ,'F' ,'NE','NA', $
               'MG','AL','SI','P' ,'S' ,'CL','AR','K' ,'CA','SC','TI', $
               'V' ,'CR','MN','FE','CO','NI','CU','ZN','GA','GE','AS', $
               'SE','BR','KR','RB','SR','Y' ,'ZR','NB','MO','TC','RU', $
               'RH','PD','AG','CD','IN','SN','SB','TE','I' ,'XE','CS', $
               'BA','LA','CE','PR','ND','PM','SM','EU','GD','TB','DY', $
               'HO','ER','TM','YB','LU','HF','TA','W' ,'RE','OS','IR', $
               'PT','AU','HG','TL','PB','BI','PO','AT','RN','FR','RA', $
               'AC','TH','PA','U' ,'NP','PU','AM','CM','BK','CF','ES', $
               'FM','MD','NO','LR','RF','DB','SG','BH','HS','MT',      $
               'UUN', $
               'UUU', $
               'UUU' ]

which gives me a "%Program code area full" error after about half of the
array has been initialised?

IDL 5.3 doesn't exhibit the problem, but I'm still curious.

Thanks for any info

paulv

-- 
Paul van Delst           Ph:  (301) 763-8000 x7274
CIMSS @ NOAA/NCEP        Fax: (301) 763-8545
Rm.202, 5200 Auth Rd.    Email: pvandelst@ncep.noaa.gov
Camp Springs MD 20746