LibreOffice 25.2 laguntza
Open instrukzioarekin irekitako fitxategiaren atzipen modua edo atzipen-zenbakia itzultzen du. Fitxategiaren atzipen-zenbakia sistema eragilearen arabera dago (OSH = Operating System Handle).
If you use a 32-Bit operating system, you cannot use the FileAttr function to determine the file access number.
Ikus baita ere: Open
  FileAttr (Channel As Integer, Attributes As Integer)
Osoko zenbakia
Channel: The number of the file that was opened with the Open statement.
Attributes: Integer expression that indicates the type of file information that you want to return. The following values are possible:
1: FileAttr indicates the access mode of the file.
2: FileAttr returns the file access number of the operating system.
Parametro-atributu bati 1 balioa ematen badiozu, ondorengo itzulera-balioak lortuko dituzu:
1 - INPUT (fitxategia sarrerarako irekita)
2 - OUTPUT (fitxategia irteerarako irekita)
4 - RANDOM (fitxategia ausazko atzipenerako irekita)
8 - APPEND (fitxategia eransteko irekita)
32 - BINARY (fitxategia bitar moduan irekita).
Sub ExampleFileAttr
    Dim iNumber As Integer
    Dim sLine As String
    Dim aFile As String
    aFile = "C:\Users\ThisUser\data.txt"
    iNumber = Freefile
    Open aFile For Output As #iNumber
    Print #iNumber, "Hau testu-lerro bat da"
    MsgBox FileAttr(#iNumber, 1 ), 0, "Atzitze modua"
    MsgBox FileAttr(#iNumber, 2 ), 0, "Fitxategi-atributua"
    Close #iNumber
End Sub