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

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>P┼Ö├¡kaz LSet [Runtime]</title><meta name="filename" content="text/sbasic/common/03120304"/><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.         p.P1{
  5.                 }
  6.         p.P2{
  7.                 }
  8.         span.T1{
  9.                 font-weight:bold;}
  10.         </style></head><body>
  11.   
  12.   
  13.   <help:to-be-embedded Eid="lset" xmlns:help="http://openoffice.org/2000/help">
  14.   <p class="Head1"><help:link Id="66409">P┼Ö├¡kaz LSet [Runtime]</help:link></p>
  15.   <p class="Paragraph">Zarovn├í ┼Öet─¢zec vlevo v ┼Öet─¢zcov├⌐ prom─¢nn├⌐ nebo zkop├¡ruje prom─¢nnou typu definovan├⌐ho u┼╛ivatelem do jin├⌐ prom─¢nn├⌐ jin├⌐ho typu definovan├⌐ho u┼╛ivatelem.</p>
  16.   </help:to-be-embedded>
  17.   <p class="Paragraph"><span class="T1">Syntaxe</span>:</p>
  18.   <p class="Paragraph">LSet Prom─¢nn├í As String = Text nebo LSet Prom─¢nn├í 1 = Prom─¢nn├í 2 <help:key-word value="LSet" tag="kw66409_1" xmlns:help="http://openoffice.org/2000/help"/></p>
  19.   <p class="Paragraph"><span class="T1">Parametr</span>:</p>
  20.   <p class="Paragraph">Prom─¢nn├í: Libovoln├í ┼Öet─¢zcov├í prom─¢nn├í, ve kter├⌐ bude ┼Öet─¢zec zarovn├ín vlevo.</p>
  21.   <p class="Paragraph">Text: ┼ÿet─¢zec, kter├╜ se m├í v ┼Öet─¢zcov├⌐ prom─¢nn├⌐ zarovnat vlevo.</p>
  22.   <p class="Paragraph">Prom─¢nn├í 1: N├ízev prom─¢nn├⌐ typu definovan├⌐ho u┼╛ivatelem, do kter├⌐ se m├í kop├¡rovat.</p>
  23.   <p class="Paragraph">Prom─¢nn├í 2: N├ízev prom─¢nn├⌐ typu definovan├⌐ho u┼╛ivatelem, ze kter├⌐ se m├í kop├¡rovat.</p>
  24.   <p class="Paragraph">Pokud je ┼Öet─¢zec krat┼í├¡ ne┼╛ ┼Öet─¢zcov├í prom─¢nn├í, zarovn├í p┼Ö├¡kaz LSet ┼Öet─¢zec v ┼Öet─¢zcov├⌐ prom─¢nn├⌐ vlevo. V┼íechna zb├╜vaj├¡c├¡ m├¡sta v ┼Öet─¢zci budou nahrazena mezerami. Pokud je ┼Öet─¢zec del┼í├¡ ne┼╛ ┼Öet─¢zcov├í prom─¢nn├í, budou zkop├¡rov├íny pouze znaky zleva a┼╛ do d├⌐lky ┼Öet─¢zcov├⌐ prom─¢nn├⌐. P┼Ö├¡kazem LSet lze tak├⌐ kop├¡rovat prom─¢nnou typu definovan├⌐ho u┼╛ivatelem do jin├⌐ prom─¢nn├⌐ stejn├⌐ho typu.</p>
  25.   <p class="P2">P┼Ö├¡klad:</p>
  26.   <p class="PropText">Sub ExampleRLSet</p>
  27.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>Dim sVar As String</p>
  28.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>Dim sExpr As String</p>
  29.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/></p>
  30.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>sVar = String(40,"*")</p>
  31.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>sExpr = "SBX"</p>
  32.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>REM <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>Align "SBX" within the 40-character reference string</p>
  33.   <p class="PropText">REM <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>Replace asterisks with spaces</p>
  34.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>RSet sVar = sExpr</p>
  35.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>Print ">"; sVar; "<"</p>
  36.   <p class="PropText"/>
  37.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>sVar = String(5,"*")</p>
  38.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>sExpr = "123457896"</p>
  39.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>RSet sVar = sExpr</p>
  40.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>Print ">"; sVar; "<"</p>
  41.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/></p>
  42.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>sVar = String(40,"*")</p>
  43.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>sExpr = "SBX"</p>
  44.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>REM Left-align "SBX" within the 40-character reference string</p>
  45.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>LSet sVar = sExpr</p>
  46.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>Print ">"; sVar; "<"</p>
  47.   <p class="PropText"/>
  48.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>sVar = String(5,"*")</p>
  49.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>sExpr = "123456789"</p>
  50.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>LSet sVar = sExpr</p>
  51.   <p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>Print ">"; sVar; "<"<text:tab-stop xmlns:text="http://openoffice.org/2000/text"/><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/></p>
  52.   <p class="PropText">End Sub</p>
  53.  </body></html>
  54.