Language and Conventions Overview | Introduction to GPAs


访问类型

The access type of a GPA symbol determines the type of access operation which can be performed. GPAs contain data which can be read, written over, or used to set the value of other GPAs. If a GPA has READ/WRITE access, you can obtain its value, or write a new value to it. To maintain the integrity of the data base, the value of some GPAs cannot be changed. In this case the GPA will have a READ ONLY access type. Some GPAs are used only to assign values to other GPAs. In this case the GPA will have a CONSTANT access type.

Access Type

Description

Read Only (RO)

Value may be obtained but not altered.

Read/Write (RW)

Value may be obtained or altered.

Constant (C)

Value may be used to set other GPAs.

 
例子

The READ capability for GPA symbols, implies that the value of the GPA being addressed may be obtained (fetched from the system) and used for various purposes in a GRIP program.

STRING/PNAME(30),USERID(30)
$$
$$ OBTAIN THE CURRENT PARTNAME
$$
PNAME = &PNAME
$$
$$ OBTAIN THE USER ID
USERID = &USERID

 
例子

The WRITE capability for GPA symbols, implies that the value of the GPA being addressed may be changed (altered) by a GRIP program.

$$ SET TOLERANCE TYPE TO GPA CONSTANT &NOTOL
$$
&TOLER=&NOTOL
$$
$$ SET THE DIMENSIONAL FRACTION TYPE TO DECIMAL
$$
&FTYPE=&DECIM
$$
$$ SET THE NUMBER OF DIMENSIONAL DECIMAL
$$ PLACES
$$
&DDECPL=4

The GPAs &TOLER, &FTYPE, and &DDECPL all have an access type of READ/WRITE allowing them to be assigned values in a program.


Copyright ©2015 胡君NX二次开发官网(www.UGapi.com) QQ:85585969 All Rights Reserved.