home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 December / Chip_2003-12_cd2.bin / oo / download / f_0019 / sbasic.jar / text / sbasic / common / 03103500.xml < prev    next >
Extensible Markup Language  |  2003-01-16  |  3KB  |  50 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>P┼Ö├¡kaz Static [Runtime]</title><meta name="filename" content="text/sbasic/common/03103500"/><meta name="language" content="en-US"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
  3.  
  4.         table.Tabelle1{
  5.                 }
  6.         span.Tabelle1A{
  7.                 width:1.499cm;}
  8.         span.Tabelle1B{
  9.                 width:16.498cm;}
  10.         tr.Tabelle11{
  11.                 }
  12.         td.Tabelle1A1{
  13.                 }
  14.         p.P1{
  15.                 }
  16.         p.P2{
  17.                 }
  18.         span.T1{
  19.                 font-weight:bold;}
  20.         span.fr1{
  21.                 }
  22.         </style></head><body>
  23.   
  24.   
  25.   <help:to-be-embedded Eid="static" xmlns:help="http://openoffice.org/2000/help">
  26.   <p class="Head1"><help:link Id="66623">P┼Ö├¡kaz Static [Runtime]</help:link></p>
  27.   <p class="Paragraph">Deklaruje prom─¢nnou nebo pole na ├║rovni procedury (tj. uvnit┼Ö procedury Sub nebo Function) tak, aby hodnoty prom─¢nn├╜ch ─ìi pole z┼»staly po ukon─ìen├¡ procedury Sub nebo Function stejn├⌐. Konvence pro pou┼╛├¡v├ín├¡ p┼Ö├¡kazu Dim jsou tak├⌐ platn├⌐.</p>
  28.   </help:to-be-embedded> <table><tr class="Tabelle11"><th class="Tabelle1A1" style="text-align:left;"><span class="Tabelle1A">
  29.       <p class="TextInTable"><draw:image draw:style-name="fr1" draw:name="HIND_1" text:anchor-type="paragraph" svg:width="0.847cm" svg:height="0.847cm" draw:z-index="0" xlink:href="65640" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" draw:filter-name="GIF - Graphics Interchange" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:text="http://openoffice.org/2000/text" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"/></p>
  30.      </span></th><th class="Tabelle1A1" style="text-align:left;"><span class="Tabelle1B">
  31.       <p class="TextInTable">P┼Ö├¡kaz Static nelze pou┼╛├¡t k definov├ín├¡ pol├¡ prom─¢nn├╜ch. Pole mus├¡ b├╜t zad├ív├ína podle pevn├⌐ velikosti.</p>
  32.      </span></th></tr></table>
  33.   <p class="Paragraph"/>
  34.   <p class="Paragraph"><span class="T1">Syntaxe</span>:</p>
  35.   <p class="Paragraph">Static N├ízev prom─¢nn├⌐ [(Za─ì├ítek To Konec)] [As Typ prom─¢nn├⌐], N├ízev prom─¢nn├⌐ 2[(Za─ì├ítek To Konec)] [As Typ prom─¢nn├⌐],... <help:key-word value="Static" tag="kw66623_1" xmlns:help="http://openoffice.org/2000/help"/></p>
  36.   <p class="P2">P┼Ö├¡klad:</p>
  37.   <p class="PropText">Sub ExampleStatic</p>
  38.   <p class="PropText">Static iInit As Integer</p>
  39.   <p class="PropText">if iInit = 0 then iInit = InitVar() REM Test if variable is already initialized</p>
  40.   <p class="PropText">iInit = iInit + 1</p>
  41.   <p class="PropText">MsgBox iInit,0,"The answer is"</p>
  42.   <p class="PropText"/>
  43.   <p class="PropText">End Sub</p>
  44.   <p class="PropText"/>
  45.   <p class="PropText">REM Function for initialization of the static variable</p>
  46.   <p class="PropText">Function InitVar() As Integer</p>
  47.   <p class="PropText">InitVar = 40 <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>REM any value for initialization</p>
  48.   <p class="PropText">End Function</p>
  49.  </body></html>
  50.