FileSystem.FileWidth(Int32, Int32) Metoda

Definice

Přiřadí šířku výstupní čáry k souboru otevřenému FileOpen pomocí funkce.

public:
 static void FileWidth(int FileNumber, int RecordWidth);
public static void FileWidth(int FileNumber, int RecordWidth);
static member FileWidth : int * int -> unit
Public Sub FileWidth (FileNumber As Integer, RecordWidth As Integer)

Parametry

FileNumber
Int32

Required. Libovolné platné číslo souboru.

RecordWidth
Int32

Required. Číselný výraz v rozsahu 0–255 včetně, který označuje, kolik znaků se zobrazí na řádku před zahájením nového řádku. Pokud RecordWidth se rovná 0, není nijak omezena délka čáry. Výchozí hodnota je RecordWidth 0.

Výjimky

Režim souboru je neplatný.

Příklady

Tento příklad používá FileWidth funkci k nastavení šířky výstupní čáry pro soubor.

Dim i As Integer
FileOpen(1, "TESTFILE", OpenMode.Output) ' Open file for output.
FileWidth(1, 5)   ' Set output line width to 5.
For i = 0 To 9   ' Loop 10 times.
    Print(1, Chr(48 + I))   ' Prints five characters per line.
Next
FileClose(1)   ' Close file.

Platí pro

Viz také