home *** CD-ROM | disk | FTP | other *** search
Wrap
<?xml version="1.0" encoding="utf-8"?> <html><head><title>Funkce Seek [Runtime]</title><meta name="filename" content="text/sbasic/common/03020304"/><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> <p class="P1"/> <p class="Head1"><a name="seek"/><help:link Id="66592" xmlns:help="http://openoffice.org/2000/help">Funkce Seek [Runtime]</help:link></p> <p class="Paragraph">Určuje umístění pro další čtení nebo zápis do souboru, který byl otevřen příkazem Open. <a name="ende"/>Vrácená hodnota odpovídá hodnotě určené příkazem Seek:</p> <p class="Paragraph">U souborů s náhodným přístupem vrátí funkce Seek číslo dalšího záznamu, který se má načíst.</p> <p class="Paragraph">U všech ostatních souborů tato funkce vrátí umístění bajtu, ve kterém má dojít k další operaci.</p> <p class="Paragraph">Viz také: <help:link Id="66386" Eid="open" xmlns:help="http://openoffice.org/2000/help">Open</help:link>, <help:link Id="66552" Eid="seek" xmlns:help="http://openoffice.org/2000/help">Seek</help:link>.</p> <p class="Paragraph"><span class="T1">Syntaxe</span>:</p> <p class="Paragraph">Seek (Číslo_souboru) <help:key-word value="Seek" tag="kw66592_1" xmlns:help="http://openoffice.org/2000/help"/></p> <p class="Paragraph"><span class="T1">Vrácená hodnota</span>:</p> <p class="Paragraph">Typu Long</p> <p class="Paragraph"><span class="T1">Parametr</span>:</p> <p class="Paragraph">Číslo_souboru: Vrátí číslo souboru určené příkazem Open.</p> <p class="P2">Příklad:</p> <p class="PropText">Sub ExampleSeek</p> <p class="PropText">Dim i As Integer</p> <p class="PropText">Dim iNumber As Integer</p> <p class="PropText">iNumber = Freefile</p> <p class="PropText">Open "c:\Data.txt" For Random As #iNumber</p> <p class="PropText">For i = 1 To 10</p> <p class="PropText">PUT #iNumber, , i</p> <p class="PropText">Next i</p> <p class="PropText">Seek #iNumber, 2</p> <p class="PropText">Get #1, , i</p> <p class="PropText">Print "Date: "; i;" <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>Next Record: "; Seek(iNumber)</p> <p class="PropText">end sub</p> <p class="PropText"/> </body></html>