GETARG
Return the calling context of a function.
WebVue support - Yes.
Mode |
Mnemonic |
Syntax |
Return |
0 | MAINBRANCH | 1 | STR |
1 | ARG1 | 1 | STR |
2 | ARG2 | 1 | STR |
3 | ARG3 | 1 | STR |
4 | ARG4 | 1 | STR |
5 | ARG5 | 1 | STR |
6 | ARG6 | 1 | STR |
7 | ARG7 | 1 | STR |
8 | ARG8 | 1 | STR |
10 | SOURCE | 1 | STR |
11 | PROGRAM | 1 | STR |
12 | BRANCH | 1 | STR |
13 | FUNCTION | 1 | STR |
14 | WINDOW | 1 | STR |
15 | WBRANCH | 1 | STR |
16 | IDENTIFIER | 1 | STR |
17 | VARNAME | 1 | STR |
18 | VARVALUE | 1 | SINGLE |
19 | VARSTATUS | 1 | INTEGER |
20 | KEYTYPE | 1 | STR |
21 | KEYCODE | 1 | INTEGER |
22 | CRONTYPE | 1 | INTEGER |
23 | CRONDATE | 1 | STR |
24 | CRONTIME | 1 | STR |
25 | ARG9 | 1 | STR |
26 | ARG10 | 1 | STR |
27 | ARG11 | 1 | STR |
28 | ARG12 | 1 | STR |
29 | WEB | 1 | INTEGER |
30 | TS_VALUE | 1 | DOUBLE |
31 | TS_TYPE | 1 | INTEGER |
32 | VARVALUE_REGISTER | 1 | DOUBLE |
33 | VARVALUE_BIT | 1 | INTEGER |
34 | VARVALUE_ALARM | 1 | INTEGER |
35 | VARVALUE_TEXT | 1 | STR |
19 | GETREGION | 1 | INTEGER |
Modes ARG1 to ARG16 support the use of substitution strings. See the topic Using Substitution Strings in an Animation for more information.
Syntax 1
RtnVal = GETARG(Mode);
See table above for return type.
Execution
Mode |
Mnemonic |
Action |
0 |
MAINBRANCH
|
Returns the branch name of the program, that contains the call to GETARG. |
1-8 |
ARG1 to ARG8 |
Returns the 1st to the 8th argument from the calling function argument field. |
25-28 |
ARG9 to ARG12 |
Returns the 9th to 12th arguments from the calling function argument field. The argument field may be specified when using : CYCLIC |
10 |
SOURCE |
Returns a character string giving the source of the call: CYCLIC |
11 |
PROGRAM |
Returns the name of the current program. |
12 |
BRANCH |
Returns the branch name passed as an argument to the current function. |
13 |
FUNCTION |
Returns the name of the current function. |
14 |
WINDOW |
Returns the window name from where the call was made. This is used in the case of EDITOR.Animation.Link.Program, action linked to an alarm or EDITOR.Animation.Array. |
15 |
WBRANCH |
Returns the branch name of the window as in Mode 14. |
16 |
IDENTIFIER |
Returns the identifier of the animation concerned as in Mode 14. |
17 |
VARNAME |
Returns the name of the variable in the case of an EVENT. |
18 |
VARVALUE |
Returns the new value of a bit, alarm or register variable in the case of an EVENT. Cannot be used for text variables. |
19 |
VARSTATUS |
Returns If the SOURCE is EVENT, the status of the triggering variable. 1 if the variable is valid, 0 if the variable is invalid. If the SOURCE is either a Mimic or Array_Select, the region in which the animation resides. This usage is obsolete, use mode GETREGION instead. Return type: INTEGER. |
20 |
KEYTYPE |
Returns the shift type ("Down/Shift/Control") when using the KEY verb. |
21 |
KEYCODE |
Returns the keycode when using the KEY verb. |
22 |
CRONTYPE |
Returns the agenda type used in CRONTAB: ONCE |
23 |
CRONDATE |
Returns the date or the day of the time trigger according to the type used in CRONTAB. |
24 |
CRONTIME |
Returns the hour or minute of the time trigger according to the type used in CRONTAB. |
29 |
WEB |
Returns a flag to indicate the manner of access: 0 = local user Non-zero = WebVue client (using a Run Program animation). |
30 | TS_VALUE | Returns the UTC timestamp of the triggering event represented by the number of milliseconds since 1980 in case of an EVENT. The instruction DATETIMESTRING can be used to convert it to a character string. |
31 | TS_TYPE |
Returns the type of the timestamp in the case of an EVENT.
0 = Timestamped by the PcVue software.
|
32 | VARVALUE_REGISTER |
Returns the value of the register variable in the case of an EVENT. Note that the value is returned as a DOUBLE. |
33 | VARVALUE_BIT |
Returns the value of the bit variable in the case of an EVENT. 1 = On |
34 | VARVALUE_ALARM |
Returns the value of the alarm variable in the case of an EVENT. 0 = Off ack |
35 | VARVALUE_TEXT |
Returns the value of the text variable in the case of an EVENT. |
19 | GETREGION | Returns the region in which the animation resides in the context of a call from a Mimic or Array_Select. |
Example
For an example, select the Example link above.