Quantcast
Channel: SCN : Unanswered Discussions - SAP GUI
Viewing all articles
Browse latest Browse all 2552

Personas 3.0: What are the scopes of variable and function in script?

$
0
0

Hi Personas 3.0 experts,'

 

Scripts are used to make straight forward Ui manipulations normally. But I am thinking a bit complex situations - can we create some "lib" functions inside one script and call these functions in other scripts?

 

If so, how can these functions be defined "globally", and how can the parameters be passed among functions?

 

This basically is related to the questions how the scopes of varaibles and functions are defined in scripts?

 

Consider these cases:

 

1:  If a var, myVar, is defined "globally (no 'var')" in one script, it can be accessed in other script. - it's clear.

2: Q: How to define a function with parameters in a script that can be called in another script with the parameters?

3: Q: How to pass a variable from one script code to another script code?

 

Br,

 

Dong Zhu


Viewing all articles
Browse latest Browse all 2552

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>