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

Home » Public Forums » archive » Generating keyword parameters from 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
Generating keyword parameters from strings [message #67458] Wed, 22 July 2009 08:56 Go to previous message
Eric Hudson is currently offline  Eric Hudson
Messages: 19
Registered: June 2006
Junior Member
Hi,

Does anyone know of a method of taking a string and turning it into a
keyword parameter? As an example, say I want to write a function:

function GetProperty, object, propertyName
object->GetProperty, 'propertyName'=value ; This is pseudocode --
this line is what I need
return, value
end

Obviously I can write this using execute, but I'd prefer to avoid that
if at all possible.
Also, although I use the GetProperty method as an example, this is a
more generic question about generating keyword parameter calls (so,
for example, David's nice discussion of a general GetProperty method
http://www.dfanning.com/tips/getproperty.html doesn't help here).

If I were just setting a value this would be easy to do with _EXTRA by
making my own structure. But for getting values it doesn't seem like
there is an easy equivalent (it would be nice to just make a
_REF_EXTRA structure if it behaved equivalent to _EXTRA but it seems
it doesn't).

Thanks,
Eric
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Generating keyword parameters from strings
Next Topic: Re: rIDL

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

Current Time: Sat Oct 11 03:53:16 PDT 2025

Total time taken to generate the page: 1.10936 seconds