PDA

View Full Version : Best way to manage macro and values in subroutines


Shiamak
04-04-2013, 12:41 PM
Hi,

I have a set of VBP scripts where I maintain tons of .config type of configurations, evrythings works fine however the configuration are being maintained in Macros and their values depends for what environment the Subroutine is being called for.

Again things seems to work smoothly however when a large chunk of change in configuration needs to be made, I have to make the same change in each sub-routine call and create new macros.. e.g. N numbers of new changes, n number of macros.. which is time consuming.

I was wondering if there are any "industry standards" ways of maintain such info in VPB or if there is anyone out there doing the same thing perhaps easier and smarter way?

kinook
04-04-2013, 05:48 PM
Generally, passing in the dynamic values to the subroutine would be preferable to modifying a subroutine when values change.

Shiamak
04-04-2013, 05:52 PM
could you please post an example?

kinook
04-04-2013, 05:59 PM
See the attached sample.

Shiamak
04-04-2013, 06:06 PM
what param1 ...2 and ..3 implies? are you creating them as "MACROS" on the fly? or they are actual parameters ..e.e.g $1, $2, $3 etc?

if they are actualy parameters then how they are represented within the actual Souroutine?>

Shiamak
04-04-2013, 06:17 PM
Ok I get it, this is exactly what I am doing........

I guess I am using the best way possibly that could be used for this kind of operation in VBP
thanks