Definition of Global Variables
- 更新时间2025-10-31
- 阅读时长1分钟
To use a test variable or test object in the state machine code, define that variable or object as a global variable.
As global variables, you can define all names of the PAtools database that are of the type Variables, Table, PAbasic or pointers to it.
- All simple data types are available as data types that are included in the PAscript documentation.
- Classes cannot yet be used in PAgraph.
- The general rules for defining global variables apply.
- The variable initialization has no section initialization:. Global variables are initialized only by the test or alternatively in their own state.
- The definition happens in the Global Variables window.
- The Global Variables window opens in the Code view, when you click in the Explorer on the Global Variables node.
- An automatic definition of global variables is possible if you drag any group from PAconfigurator in the Global Variables window. There, the names that exist in that group and whose types are supported by PAscript are defined as global variables.
相关内容
- Data Types
Learn about data types in PAscript.
- Global Variables
Use the section globals code block to define PAscript global variables that correspond to variable names in your tests.
- Code View
Enter the program code that you created for states, state machines, or transitions in the code view tabs.
- Global Variables Tab
Define all variables in the test that you use in the code as global variables.