Another format for access-right keywords
Description
You can also group declarations of PowerScript variables
according to access by specifying the access-right keyword as a label.
It appears on its own line, followed by a colon (:).
Syntax
|
1 2 3 4 |
access-right: { readaccess } { writeaccess } datatype variablename { access-right } { readaccess } { writeaccess } datatype variablename { readaccess } { writeaccess } datatype variablename |
Within a labeled group of declarations, you can override the
access on a single line by specifying another access-right keyword
with the declaration. The labeled access takes effect again on the
following lines.
Examples
In these declarations, the instance variables have the access
specified by the label that precedes them. Another private variable is
defined at the end, where private overrides the public label:
|
1 2 3 4 5 6 7 8 9 10 11 |
Private: integer ii_a=10, ii_b=24 string is_Name, is_Address1 Protected: integer ii_Units double idb_Results string is_Lname Public: integer ii_Weight string is_Location="Home" private integer ii_test |
Some of these protected declarations have restricted write
access:
|
1 2 3 4 |
Protected: integer ii_Units privatewrite double idb_Results privatewrite string is_Lname |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest