01020300.xhp (c5ffc49b) 01020300.xhp (9b5c5849)
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--***********************************************************
4 *
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file

--- 76 unchanged lines hidden (view full) ---

85<paragraph role="paragraph" id="par_id3145258" xml-lang="en-US" l10n="U" oldref="112">The variable is valid as long as the $[officename] session lasts.</paragraph>
86<paragraph role="code" id="par_id3153198" xml-lang="en-US" l10n="CHG" oldref="60">PUBLIC VarName As TYPENAME</paragraph>
87<paragraph role="paragraph" id="par_id3150088" xml-lang="en-US" l10n="U" oldref="61">The variable is valid in all modules.</paragraph>
88<paragraph role="code" id="par_id3158212" xml-lang="en-US" l10n="CHG" oldref="62">PRIVATE VarName As TYPENAME</paragraph>
89<paragraph role="paragraph" id="par_id3152994" xml-lang="en-US" l10n="U" oldref="63">The variable is only valid in this module.</paragraph>
90<paragraph role="code" id="par_id3150886" xml-lang="en-US" l10n="U" oldref="64">DIM VarName As TYPENAME</paragraph>
91<paragraph role="paragraph" id="par_id3150368" xml-lang="en-US" l10n="U" oldref="65">The variable is only valid in this module.</paragraph>
92<paragraph role="heading" id="hd_id5097506" xml-lang="en-US" level="3" l10n="NEW">Example for private variables</paragraph>
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--***********************************************************
4 *
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file

--- 76 unchanged lines hidden (view full) ---

85<paragraph role="paragraph" id="par_id3145258" xml-lang="en-US" l10n="U" oldref="112">The variable is valid as long as the $[officename] session lasts.</paragraph>
86<paragraph role="code" id="par_id3153198" xml-lang="en-US" l10n="CHG" oldref="60">PUBLIC VarName As TYPENAME</paragraph>
87<paragraph role="paragraph" id="par_id3150088" xml-lang="en-US" l10n="U" oldref="61">The variable is valid in all modules.</paragraph>
88<paragraph role="code" id="par_id3158212" xml-lang="en-US" l10n="CHG" oldref="62">PRIVATE VarName As TYPENAME</paragraph>
89<paragraph role="paragraph" id="par_id3152994" xml-lang="en-US" l10n="U" oldref="63">The variable is only valid in this module.</paragraph>
90<paragraph role="code" id="par_id3150886" xml-lang="en-US" l10n="U" oldref="64">DIM VarName As TYPENAME</paragraph>
91<paragraph role="paragraph" id="par_id3150368" xml-lang="en-US" l10n="U" oldref="65">The variable is only valid in this module.</paragraph>
92<paragraph role="heading" id="hd_id5097506" xml-lang="en-US" level="3" l10n="NEW">Example for private variables</paragraph>
93<paragraph role="paragraph" id="par_id8738975" xml-lang="en-US" l10n="NEW">Enforce private variables to be private across modules by setting CompatibilityMode(true).</paragraph><comment>from i17948, see i54894</comment><paragraph role="code" id="par_id146488" xml-lang="en-US" l10n="NEW">REM ***** Module1 *****</paragraph>
93<paragraph role="paragraph" id="par_id8738975" xml-lang="en-US" l10n="NEW">Enforce private variables to be private across modules by setting CompatibilityMode(true).</paragraph><comment>from i17948, see i54894</comment>
94<paragraph role="code" id="par_id146488" xml-lang="en-US" l10n="NEW">REM ***** Module1 *****</paragraph>
94<paragraph role="code" id="par_id2042298" xml-lang="en-US" l10n="NEW">Private myText As String</paragraph>
95<paragraph role="code" id="par_id2969756" xml-lang="en-US" l10n="NEW">Sub initMyText</paragraph>
96<paragraph role="code" id="par_id9475997" xml-lang="en-US" l10n="NEW">myText = "Hello"</paragraph>
97<paragraph role="code" id="par_id6933500" xml-lang="en-US" l10n="NEW">print "in module1 : ", myText</paragraph>
98<paragraph role="code" id="par_id631733" xml-lang="en-US" l10n="NEW">End Sub</paragraph>
99<paragraph role="code" id="par_id8234199" xml-lang="en-US" l10n="NEW">REM ***** Module2 *****</paragraph>
100<paragraph role="code" id="par_id6969512" xml-lang="en-US" l10n="NEW">'Option Explicit</paragraph>
101<paragraph role="code" id="par_id1196935" xml-lang="en-US" l10n="NEW">Sub demoBug</paragraph>

--- 15 unchanged lines hidden ---
95<paragraph role="code" id="par_id2042298" xml-lang="en-US" l10n="NEW">Private myText As String</paragraph>
96<paragraph role="code" id="par_id2969756" xml-lang="en-US" l10n="NEW">Sub initMyText</paragraph>
97<paragraph role="code" id="par_id9475997" xml-lang="en-US" l10n="NEW">myText = "Hello"</paragraph>
98<paragraph role="code" id="par_id6933500" xml-lang="en-US" l10n="NEW">print "in module1 : ", myText</paragraph>
99<paragraph role="code" id="par_id631733" xml-lang="en-US" l10n="NEW">End Sub</paragraph>
100<paragraph role="code" id="par_id8234199" xml-lang="en-US" l10n="NEW">REM ***** Module2 *****</paragraph>
101<paragraph role="code" id="par_id6969512" xml-lang="en-US" l10n="NEW">'Option Explicit</paragraph>
102<paragraph role="code" id="par_id1196935" xml-lang="en-US" l10n="NEW">Sub demoBug</paragraph>

--- 15 unchanged lines hidden ---