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

Home » Public Forums » archive » Re: Obtaining variable names as strings
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: Obtaining variable names as strings [message #25050 is a reply to message #25049] Mon, 14 May 2001 05:41 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Ian Dean <ian.d.dean@baesystems.com> writes:

1.) please don't use html mail in future posts.

2.) i'm still not entirely sure what you want to do here, but from
your description it sounds as if there are several things done in
an unnecessarily complex way? Even if the include file is sacrosanct
as you say (BTW: I would never accept such a statement), you could
still treat it as a normal ASCII file and read in the variable definitions
e.g. into structures like { varname:"Joe", value:"200" } or into
two arrays: strarr() and values(). This would make searching and
matching much easier.

3.) but if you really need to include the include file as such,
Reimar Bauer can probably tell you how to use the undocumented
features of routine_name() to achieve what you want.

Martin


> <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> <html>
> Hi All,
> <br>&nbsp;&nbsp;&nbsp; I have an include file containing both variable
> definitions and COMMON block(s). I need to obtain a string representing
> a variable name that is set to a unique value.
> <p>Pro Get_val
> <br>@Vars.inc
> <br>.....
> <br>End
> <p>File Vars.inc:-
> <br>&nbsp;&nbsp;&nbsp; Fred = 100
> <br>&nbsp;&nbsp;&nbsp; Joe =200
> <br>&nbsp;&nbsp;&nbsp; .....
> <br>&nbsp;&nbsp;&nbsp; Mary = 725
> <br>&nbsp;&nbsp;&nbsp; Anne = 812
> <br>Common Rubbish,Fred,Joe,....Mary, Anne
> <p>For instance, if the user gives a value of 200, I require to give the
> string 'Joe'.
> <p>I have been able to use the Help,name='*',out=xxxx to get a list of
> all variables, which can then be interrogated. However, there are a significant
> number of variables and I'm concerned about the time taken to perform this
> in a time-critical operation.
> <p>Some added info:
> <p>1) Is it possible to get a list of common variable names (like IDLDE
> provides) ?
> <br>2) The final program is in "SAVed" format and no longer has access
> to the build files.
> <br>3) The format of the include files is sacrosanct and are defined by
> external sources.
> <br>4) Each of the numbers (100,200....725,812) are unique within this
> file (but obviously not throughout a run).
> <p>I hope there is someone out there who can help, or give me some useful
> pointers.
> <p>Regards,
> <br>&nbsp;&nbsp;&nbsp; Ian
> <br>&nbsp;</html>
>

--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[Message index]
 
Read Message
Read Message
Previous Topic: !version.arch
Next Topic: Displaying large volumes

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

Current Time: Sat Oct 11 07:49:39 PDT 2025

Total time taken to generate the page: 2.31775 seconds