:: Punctuation
The double colon (::) is a short-hand syntax for referencing constant named members of database object containers, for example dynamic ProDataSets, queries, temp-tables, and buffers.
The following rules will help you to decide whether to use dot, colon, or double colon syntax:
- Use a dot between two names when the left-hand side name is the actual name of a database or table, known at compile time, and is not a handle or reference of any kind. For example,
Customer.CustNum
orSports2000.Customer
orSports2000.Customer.CustNum
.- Use a colon between two character strings when the left-hand side is a handle or reference, and is not the actual name of a database or table, and the right-hand side is an attribute or method for the left-hand-side handle or reference. For example,
hBuff:NUM-FIELDS
, orhDset:NUM-BUFFERS
orhBuff:FIND-FIRST
.- Use a double colon between two character strings when the left-hand side name is a handle to a container object of some kind (buffer, table or ProDataSet) and the right-hand side is not an attribute or method, but instead is a named member of the left-hand side. For example,
hBuff::CustNum
orhDset::Customer
orhDSet::Customer::CustNum
.For example, if
hBuff
is a HANDLE to theCustomer
table, thenhBuff:NAME
returns the string "Customer", buthBuff::NAME
returns the value of theNAME
field for the current record in thehBuff
Buffer, e.g."Lift Line Skiing"
.See also
OpenEdge Release 10.2B
|