AnsweredAssumed Answered

vrf Dynamic creation of local variables?

Question asked by VRFuser on Jun 8, 2005
How about this? 

There are at least two things you need to do to make this work.
First, you needs to declare you variables in a Excel or Text file format
and reading it and dynamically create at the beginning of the Library.
All the variable have to be in a container. This container can contain
mixing of variable types ( text, num, record, array ).

Secondly,
You need to redesign your function methodology a little.  All functions
or  User Object must have a Data_In pin and a Data_out pin.

By passing the variable container to each function and out to each
function.  You can get the variables or updates the variable as needed
from one function to the other.

"This is like a data stream thru your library".  You never have to use
SET VARIABLE or GET VARIABLE.  Therefore, this is not global.

I do this all the time when coding.  I hardly use and set or get
variable command in my codes.  This will avoid a lot of headache when
trying to find
Duplicate variables in your code.

Hope that help.

Han

-----Original Message-----
From: Shawn Fessenden [mailto:shawn@testech-ltd.com]
Sent: Thursday, June 09, 2005 9:21 AM
To: VRF
Subject: RE: [vrf] Dynamic creation of local variables?

> Is there a way to make a dynamically
> created variable local to a context or
> library and not global?

Not that I know of - if anybody else knows I'd be interested too.

However, I can think of something else that's almost as good: declare a
Variant local. In that case you can store anything you want in it, even
arrays of Variant. And of course each array element could be a Variant
array containing two Variant elements: a name and a value.

On the other hand you could go the object route too, though that would
take a bit more thought. Or dynamic IL (which can be done, though I have
yet to master this technique).
-SHAWN-

---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes