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

Home » Public Forums » archive » Re: Declaring large vectors in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Declaring large vectors in IDL [message #70492 is a reply to message #70491] Fri, 16 April 2010 18:35 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Apr 16, 10:17 pm, fgg <fabioguimaraesgoncal...@gmail.com> wrote:
> ... and I'd like to add it to the variables view. When I type @'path/
> batchfilename.pro' at the IDL prompt, I get the following message: "%
> Program code area full". Any suggestions?

Do not write large literals, like that one. You just demonstrated one
of the several reasons not to do it. Put those numbers into a file,
then read it into the variable.

There are many ways to read those values from a file, depending on how
you write them into the file. If all you do is strip the "a = [" and
the "]" from the ends of that file, you could read it as

nl=file_lines('file.txt')
a=strarr(nl)
openr,unit,'file.txt',/get_lun
readf,unit,a
free_lun,unit
a=strjoin(a)
a=strsplit(a,',',/extract)
a=fix(a)

There are much simpler ways to read it, if the file is written a
little differently.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Comparison operators and floating-point errors
Next Topic: Re: Virtual machine popup

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

Current Time: Wed Oct 08 19:27:26 PDT 2025

Total time taken to generate the page: 0.00449 seconds