Hi,

I am wondering what the scope of variables declared is in the Main function.

I have the following simple STAX job:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "D:\DistributedTesting\stax.dtd">
<stax>
<script>
                BUILD = 'MainBuild'
</script>
<defaultcall function="main"/>


<function name="main" scope="local">
                <sequence>
                                <script>
                                                if BUILD == 'MainBuild':
                                                                branch = ''
                                                else:
                                                                branch = 
'_cbgvbvb'
                                </script>
                                <call function="'Try'"/>
                </sequence>
</function>

<function name="Try" scope="local">
                <log message="1">branch</log>
</function>
</stax>

In this simple STAX job ran on STAF 3.4.7 onwards, the value of variable 
"branch" was passed into the sub function "Try" without passing argument to the 
function.

Is it the correct behaviour?

Thanks,

Cindy Zhu
Senior SQA Engineer
Quality Assurance
Phone: 1 403 213 4231
cindy....@ihs.com
IHS | Information | Analytics | Expertise
www.ihs.com


This email message is for the sole use of the intended recipient(s) and may 
contain confidential and privileged information. Any unauthorized review, use, 
disclosure or distribution is prohibited. If you are not the intended 
recipient, please contact the sender by reply e-mail and destroy all copies of 
the original message. Thank you.

Please consider the environment before printing this e-mail.

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to