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

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>P┼Ö├¡kaz Exit [Runtime]</title><meta name="filename" content="text/sbasic/common/03090412"/><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="exit" xmlns:help="http://openoffice.org/2000/help"><a name="exit"/>
  26.   <p class="Head1"><help:link Id="66590">P┼Ö├¡kaz Exit [Runtime]</help:link></p>
  27.   <p class="Paragraph">Ukon─ì├¡ p┼Ö├¡kazy Do...Loop, For...Next, proceduru typu Function nebo proceduru typu Sub.</p>
  28.   </help:to-be-embedded>
  29.   <p class="Paragraph"><span class="T1">Syntaxe</span>:</p>
  30.   <p class="Paragraph">viz Parametr <help:key-word value="Exit" tag="kw66590_1" xmlns:help="http://openoffice.org/2000/help"/></p>
  31.   <p class="Paragraph"><span class="T1">Parametr</span>:</p>
  32.   <p class="Paragraph"><help:key-word value="Exit" tag="kw66590_2" xmlns:help="http://openoffice.org/2000/help"/><text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/> Exit <text:s text:c="2" xmlns:text="http://openoffice.org/2000/text"/><text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>DO </p>
  33.   <p class="Paragraph">Tento parametr je platn├╜ pouze mezi p┼Ö├¡kazy Do...Loop, kde slou┼╛├¡ k ukon─ìen├¡ smy─ìky. Prov├íd─¢n├¡ programu pokra─ìuje p┼Ö├¡kazem, kter├╜ n├ísleduje za p┼Ö├¡kazem Loop. Pokud jsou p┼Ö├¡kazy Do...Loop vno┼Öeny, ┼Ö├¡zen├¡ p┼Öejde do smy─ìky o jednu ├║rove┼ê v├╜┼í.</p>
  34.   <p class="P2">Exit For</p>
  35.   <p class="Paragraph">Tento parametr je platn├╜ pouze ve smy─ìce For...Next, kde slou┼╛├¡ k ukon─ìen├¡ smy─ìky. Prov├íd─¢n├¡ programu pokra─ìuje prvn├¡m p┼Ö├¡kazem, kter├╜ n├ísleduje za p┼Ö├¡kazem Next. Pokud jsou p┼Ö├¡kazy vno┼Öeny, ┼Ö├¡zen├¡ p┼Öejde do smy─ìky o jednu ├║rove┼ê v├╜┼í.</p>
  36.   <p class="P2">Exit Function</p>
  37.   <p class="Paragraph">Ihned ukon─ì├¡ proceduru typu Function. Prov├íd─¢n├¡ programu pokra─ìuje p┼Ö├¡kazem, kter├╜ n├ísleduje za vol├ín├¡m procedury typu Function.</p>
  38.   <p class="P2">Exit Sub</p>
  39.   <p class="Paragraph">Ihned ukon─ì├¡ proceduru typu Sub. Prov├íd─¢n├¡ programu pokra─ìuje p┼Ö├¡kazem, kter├╜ n├ísleduje za vol├ín├¡m procedury typu Sub.</p>
  40.   <table><tr class="Tabelle11"><th class="Tabelle1A1" style="text-align:left;"><span class="Tabelle1A">
  41.       <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="65980" 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>
  42.      </span></th><th class="Tabelle1A1" style="text-align:left;"><span class="Tabelle1B">
  43.       <p class="TextInTable">P┼Ö├¡kaz Exit neur─ìuje konec struktury a nelze jej zam─¢┼êovat s p┼Ö├¡kazem End.</p>
  44.      </span></th></tr></table>
  45.   <p class="Paragraph"/>
  46.   <p class="Paragraph">P┼Ö├¡klad:</p>
  47.   <p class="PropText">Sub ExampleExit</p>
  48.   <p class="PropText">Dim sReturn As String</p>
  49.   <p class="PropText">Dim sListArray(10) as String</p>
  50.   <p class="PropText">Dim siStep as Single</p>
  51.   <p class="PropText">For siStep = 0 to 10 <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>REM Fill array with test data</p>
  52.   <p class="PropText">sListArray(siStep) = chr(siStep + 65)</p>
  53.   <p class="PropText">msgbox sListArray(siStep)</p>
  54.   <p class="PropText">next siStep</p>
  55.   <p class="PropText">sReturn = LinSearch(sListArray(), "B")</p>
  56.   <p class="PropText">Print sReturn</p>
  57.   <p class="PropText">end sub</p>
  58.   <p class="PropText"/>
  59.   <p class="PropText"/>
  60.   <p class="PropText">Function LinSearch( sList(), sItem As String ) as integer</p>
  61.   <p class="PropText">dim iCount as Integer</p>
  62.   <p class="PropText">REM LinSearch searches a TextArray:sList() for <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>a TextEntry:</p>
  63.   <p class="PropText">REM Returns the index of the entry or 0 ( Null)</p>
  64.   <p class="PropText">for iCount=1 to Ubound( sList() )</p>
  65.   <p class="PropText">if sList( iCount ) = sItem then</p>
  66.   <p class="PropText">Exit for REM sItem found</p>
  67.   <p class="PropText">end if</p>
  68.   <p class="PropText">next iCount</p>
  69.   <p class="PropText">if iCount = Ubound( sList() ) then iCount = 0</p>
  70.   <p class="PropText">LinSearch = iCount</p>
  71.   <p class="PropText">end function</p>
  72.   <p class="PropText"/>
  73.  </body></html>
  74.