Module Module1
    Sub Main()
        Dim b As Byte
        FileOpen(1, "data.txt", OpenMode.Random, , , )
        FilePut(1, CByte(11), )
        FilePut(1, CByte(12), )
        FilePut(1, CByte(13), )
        FilePut(1, CByte(14), )

        FilePut(1, CByte(11), 2)
        
        FilePut(1, CByte(114), 10)
        Seek(1, 1)

        While Not EOF(1)
            FileGet(1, b)
            Console.WriteLine(b)
        End While



        FileClose(1)
        Dim myfile As Short

        myfile = FreeFile()
        FileOpen(myfile, "data.txt", OpenMode.Random, , , )
        FileClose(myfile)
        Console.ReadKey()
    End Sub

End Module
