Please enable JavaScript to view this site.

Function to link a global variable.

Creates an interface to the variable. The specified local variable is closely associated with the interface.

Sintassi

i32 gv_link (string var, i32 len, string wrtPsw, i32 gvID, buff)

var

Variable name.

Can contain letters, numbers, spaces, and special characters. Not case sensitive

len

Size in bytes of the global variable

wrtPsw

Password for write access. If omitted (""), the password is not used

gvID

Local variable in which the function inserts the ID relative to the interface to the global variable. In case of an error, the function inserts 0

buff

Local buffer used as a cache connected to the ID (if present).

It is used to update the global variable information during read and write operations. When the function is called, its value indicates the initialization value of the global variable. It must necessarily be the same size as the global variable

Result

Returns:

Value

Meaning

0

Operation successfully completed

1

Link created, but GV is in lock, so 'locVar' is not updated

2

Link created, but no write access (wrong password or not the first link)

3

Link created, but GV is in lock, so 'locVar' is not updated and you do not have write access (wrong password or it is not the first link)

-1

Variable does not exist

-2

Invalid size

-3

Invalid password

-10

Manager not enabled

-11

NULL name

-12

locVar NULL

-13

gvIDrule NULL

-14

size NULL

-15

The size of the cache is smaller than the size of the variable.

Alarm 9900 is generated

Validity

Rule, Task

Note


 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC