Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-18-2009, 02:01 PM
digit digit is online now
Registered User
 
Join Date: 05-14-2009
Posts: 14
subroutine parameters

Got a question about optional parameters to subroutines. For a few of my commonly-used subs, I'd like to have some optional parameters to make them a little extensible.

For boolean parameters to say "don't do that" or "do this", probably using a script build condition that checks for the existence of the macro as well as its value can solve that problem. (Though now that I think about it, this kind of behavior is bad programming practice... oops.)

However, for other parameters such as strings to put in the log, things seem a bit more tricky. The best I can come up with is setting the parameter to some default value if the parameter is not defined as the first step of the subroutine. The issue with this is then "popping" that value at the end by deleting the macro.

Is there an example or recommended way of doing this? Or am I trying to do too much?

Sorry if this was unclear, and let me know if I can explain anything better.

Thanks in advance.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 07:55 PM.


Copyright © 1999-2023 Kinook Software, Inc.