home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 December
/
Chip_2003-12_cd2.bin
/
oo
/
download
/
f_0019
/
sbasic.jar
/
text
/
sbasic
/
common
/
03020101.xml
< prev
next >
Wrap
Extensible Markup Language
|
2003-01-16
|
2KB
|
48 lines
<?xml version="1.0" encoding="utf-8"?>
<html><head><title>Příkaz Close [Runtime]</title><meta name="filename" content="text/sbasic/common/03020101"/><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">
p.P1{
}
p.P2{
}
span.T1{
font-weight:bold;}
</style></head><body>
<help:to-be-embedded Eid="close" xmlns:help="http://openoffice.org/2000/help">
<p class="Head1"><help:link Id="66504">Příkaz Close [Runtime]</help:link></p>
<p class="Paragraph">Zavře určený soubor otevřený příkazem Open.</p>
</help:to-be-embedded>
<p class="Paragraph"><span class="T1">Syntaxe:</span></p>
<p class="Paragraph">Close Číslo_souboru typu Integer[, Číslo_souboru_2 typu Integer[,...]] <help:key-word value="Close" tag="kw66504_1" xmlns:help="http://openoffice.org/2000/help"/></p>
<p class="Paragraph"><span class="T1">Parametr:</span></p>
<p class="Paragraph">Číslo_souboru: Jakýkoli výraz typu Integer udávající číslo datového kanálu otevřeného pomocí příkazu <span class="T1">Open</span>.</p>
<p class="P2">Příklad:</p>
<p class="PropText">Sub ExampleWorkWithAFile</p>
<p class="PropText">Dim iNumber As Integer</p>
<p class="PropText">Dim sLine As String</p>
<p class="PropText">Dim aFile As String</p>
<p class="PropText">Dim sMsg as String</p>
<p class="PropText">aFile = "c:\data.txt"</p>
<p class="PropText">sMsg = = ""</p>
<p class="PropText">iNumber = Freefile</p>
<p class="PropText">Open aFile For Output As #iNumber</p>
<p class="PropText">Print #iNumber, "First line of text"</p>
<p class="PropText">Print #iNumber, "Another line of text"</p>
<p class="PropText">Close #iNumber</p>
<p class="PropText"/>
<p class="PropText">iNumber = Freefile</p>
<p class="PropText">Open aFile For Input As iNumber</p>
<p class="PropText">While not eof(iNumber)</p>
<p class="PropText">Line Input #iNumber, sLine</p>
<p class="PropText">If sLine <>"" then</p>
<p class="PropText">sMsg = sMsg & sZeile & chr(13)</p>
<p class="PropText">end if</p>
<p class="PropText">wend</p>
<p class="PropText">Close #iNumber</p>
<p class="PropText">Msgbox sMsg</p>
<p class="PropText">End Sub</p>
<p class="PropText"/>
</body></html>