execute problem [message #7956] |
Thu, 30 January 1997 00:00  |
R. Bauer
Messages: 137 Registered: November 1996
|
Senior Member |
|
|
Hi,
here is an other problem
we have idl versions 3.61 and 4.01.
in idl 4.01 it's possible to execute a string with the length 625.
idl 3.61 gave the error that's the string is too long.
There is no way in our case to seperate the string, because it's a
definition for a structure.
Now the questions:
where is the border for a string to execute by idl 4.01?
how could I solve the problem for idl 3.61?
--
R.Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@kfa-juelich.de
|
|
|
Re: execute problem [message #8004 is a reply to message #7956] |
Sun, 02 February 1997 00:00  |
steinhh
Messages: 260 Registered: June 1994
|
Senior Member |
|
|
In article <5cvbot$r2@jungle.deceiver.org>, alpha@jungle.deceiver.org (HSR Sys-Admin) writes:
|>
|> struct={ tagname: fltarr(10,20) }
|>
|> print,struct.tagname(*,12:15)
|>
|> Can you programm this ?
|>
|> print,struct.(1)....?????
|>
|>
|> this is the real problem with it i think.... and when you solved it,
|> compare the speed of your routine with the one execute you need for
|> it in the simple case...
|>
Well, "struct.(0)" *should* be equivalent to "struct.tagname", so
why not try it - works for me:
IDL> struct={ tagname: fltarr(10,20) }
IDL> help,struct.(0)(*,12:15)
<Expression> FLOAT = Array(10, 4)
Stein Vidar
|
|
|
Re: execute problem [message #8008 is a reply to message #7956] |
Sat, 01 February 1997 00:00  |
alpha
Messages: 49 Registered: September 1996
|
Member |
|
|
Phil Williams <williams@irc.chmcc.org> writes:
> R. Bauer wrote:
>> Hi,
>> here is an other problem
>> how could I solve the problem for idl 3.61?
> One way that I could think of off the top of my head would be to
> reference your structures via tag number instead of tag name. i.e.
> structure.(0).(1).(10)
> I'd imagine that there might be some overhead if you are using anonymous
> strutures to determine the tag placement. Something like,
> names = tag_names(structure)
> index1 = where(names eq structure2)
> names = tag_names(structure.(index))
> index2 = where(names eq structure3)
> etc.
> ps = ').('
> command = $
> 'print, structure.('+strtrim(index1,2)+ps+strtrim(index2,2)+ps+....
> Hope this helps,
>
Phil,
this is fine, but what can you do, if:
have to access slices of arrays in structure-tagnames???
struct={ tagname: fltarr(10,20) }
print,struct.tagname(*,12:15)
Can you programm this ?
print,struct.(1)....?????
this is the real problem with it i think.... and when you solved it,
compare the speed of your routine with the one execute you need for
it in the simple case...
Dr. Roepcke
|
|
|
Re: execute problem [message #8009 is a reply to message #7956] |
Sat, 01 February 1997 00:00  |
alpha
Messages: 49 Registered: September 1996
|
Member |
|
|
"R. Bauer" <r.bauer@kfa-juelich.de> writes:
> Hi,
> here is an other problem
> we have idl versions 3.61 and 4.01.
> in idl 4.01 it's possible to execute a string with the length 625.
> idl 3.61 gave the error that's the string is too long.
> There is no way in our case to seperate the string, because it's a
> definition for a structure.
> Now the questions:
> where is the border for a string to execute by idl 4.01?
we use 4.0.1 (on VMS 6.13.2G)
it is not a border for the string-length, i successfully created
structures with execute having a string of 1500 Chars...
it is
a) a problem of comma (,): you cant use more than 123 my
knowledge or the function-parameter-transfer will fail
b) a problem of tag-types: if you create a lot of different types
of tags, than the execute will fail with programm code area fail!
I contacted Creaso on it and they can reproduce the error with
my fail.pro on each plattform (see X-Mas- survey). My fail.pro
changes the tagtyp everytime (which is worst). In this case the
execute will fail at the 24th tag! The length of the string is
void!
c) Mr. Allewelt from Creaso contacted RSI and is working on this
problem.
you can do a work arround by doing a iterative create_structure
call in a execute-simulating-routine! I have written such a routine
to be able to work with more than 24 tags, but the routine
is about 100 times slower!!!
Creating a structure is lasting about 1-2 secs in this case, which
is much to long!
Dr. Roepcke
|
|
|
Re: execute problem [message #8027 is a reply to message #7956] |
Fri, 31 January 1997 00:00  |
steinhh
Messages: 260 Registered: June 1994
|
Senior Member |
|
|
In article <32F09DD4.794B@kfa-juelich.de>, "R. Bauer" <r.bauer@kfa-juelich.de> writes:
|> in idl 4.01 it's possible to execute a string with the length 625.
|> idl 3.61 gave the error that's the string is too long.
|>
|> There is no way in our case to seperate the string, because it's a
|> definition for a structure.
[..]
|> how could I solve the problem for idl 3.61?
|>
Take a look at the function CREATE_STRUCT()
You should be able to rewrite any structure definition into
a series of CREATE_STRUCT() statements, adding tag after
tag, i.e.,
struct = create_struct(struct,tagname,value)
I suspect it might be less efficient, in fact, since
it could lead to excessive copying as you build up the structure.
It should work, though.
Stein Vidar
|
|
|