Debian Codegraph @

help/info/public.html

raw symbols SCIP
1 <!--
2 Copyright (c) 2000-2021 Ericsson Telecom AB
3 All rights reserved. This program and the accompanying materials
4 are made available under the terms of the Eclipse Public License v2.0
5 which accompanies this distribution, and is available at
6 https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
7
8 Contributors:
9
10 Baji, Laszlo
11 Balasko, Jeno
12 Szabados, Kristof
13 -->
14 <html>
15 <head>
16 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
17 <meta http-equiv="Content-Language" content="en-us">
18 <title>public</title>
19 </head>
20 <body bgcolor="#DAD3C5" vlink="#0094D2" link="#003258">
21 <table align="left" border="0" cellspacing="0" cellpadding="0" valign=top>
22 <tr>
23 <td width=105 height=40><a href="https://projects.eclipse.org/projects/tools.titan"><img src="../images/titan_transparent.gif" border=0 width=105 height=40 align="left" alt="Titan"></a></td>
24 </tr>
25 </table>
26 <table border="0" align="right" cellpadding="0" cellspacing="0">
27 <tr>
28 <td><a href="../titan_main.html" alt="contents"><img border="0" src="../images/ao.jpg" width="53" height="40"></a></td>
29 <td><a href="../titan_index.html" alt="index"><img border="0" src="../images/up.jpg" width="53" height="40"></a></td>
30 <td><a href="profiler.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td>
31 <td><a href="raise.html" alt="next"><img border="0" src="../images/right.jpg" width="53" height="40"></a></td>
32 </tr>
33 </table>
34 <p><br clear="all">
35 </p>
36 <hr>
37 <h1>public</h1>
38 <hr align="left" width="75%">
39 <p>Public is a visibility modifier, that can be atteched to definitions on module level, or in component types.
40 It means:
41 <ul>
42 <li>on module level: the definition is visible in every module where it is imported to.
43 <li>in a component type: the definition is visible via the runs on scope in every function/altstep/testcase.
44 </ul>
45 <p>Related keywords:</p>
46 <ul>
47 <li><a href="friend.html"><b><font face="Courier New" color="#003258" size="4">friend</font></b></a></li>
48 <li><a href="private.html"><b><font face="Courier New" color="#003258" size="4">private</font></b></a></li>
49 </ul>
50 <hr align="left" width="50%">
51 <div align="center">
52 <center>
53 <table border="0" width="90%" bgcolor="#FFB599" cellpadding="4">
54 <tr>
55 <td width="100%">
56 <h3 align="center"><font face="Courier New" color="#003258" size="5"><b>public definition;</b></font></h3>
57 </td>
58 </tr>
59 </table>
60 </center>
61 </div>
62 <hr align="left" width="50%">
63 <p>Example 1:
64 <p><font face="Courier New">module module1 {<br>
65 import from module2 all;<br>
66 <br>
67 const module2Type c_example1 := 4; //by default public, visible<br>
68 const module2PublieType c_example2 := 4; //public, visible<br>
69 const module2FriendType c_example3 := 4; //this is a friend module, visible<br>
70 const module2PrivateType c_example4 := 4; //ERROR, not visible<br>
71 }</font>
72 <p><font face="Courier New">module module2 {<br>
73 friend module1;<br>
74 <br>
75 type integer module2Type;//by default public, visible in every module<br>
76 public type integer module2PublieType; //public, visible in every module<br>
77 friend type integer module2FriendType; //friend, visible only in friend modules<br>
78 private type module2PrivateType; //private, visible only in this module<br>
79 }</font>
80 <hr align="left" width="25%">
81 <hr align="left" width="25%">
82 </body>
83 </html>