Contents

# Put# Statement

Rileetivete faylera mareekko woy laminaatu faylera bayitete aante borreessanno.

Use Print# statement to print data to a sequential text file. Use Write# statement to write data to a sequential text file with delimiting characters.

### Syntax:

    Put [#]fileNum, [recordNum|filePos], variable

### Parameters:

fileNum: Any integer expression that defines the file that you want to write to.

recordNum, filePos: For relative files (random access files), the number of the record that you want to write.

Laminaatu fayllara (laminaati injo), faylete giddo borreessa hanafattowa bayitete ofolla.

variable: Name of the variable that you want to write to the file.

Qaagiishsha rileetive fayllara: Kunni soorramaanchi amado Fani fooliishsho qaali Len giddo mareekkote seendilli ledo fiixoontannokkiro, haaro borreessantino mareekko jeeffo nna albisufi mareekko mereero noo foonqe borreessitanni nootto faylete giddonni heeraancho daatinni….

Qaagiishsha laminaatu fayllara: Soorramaanote amado badantino ofollara borreessantino, qoleno faylete mu'lisaanchi jeeffote bayite gedensaanni surkamanno. Maareekkubbate mereero gattanno foonqe dino.

### Example:

      Sub ExampleRandomAccess
          Dim iNumber As Integer
          Dim sBorro Baxxaanchu Gede ' Baxxaancho ikka noose
          Dim aFile As String
          aFile = "C:\Users\ThisUser\data.txt"
          iNumber = Freefile
          Open aFile For Random As #iNumber Len=32
          #iKiiro hasi,1 ' Ofolla hanfoho
          Put #iNumber, , "This is the first line of text" ' Fill line with text
          Put #iNumber, , "This is the second line of text"
          Put #iNumber, , "This is the third line of text"
          Seek #iNumber,2
          Get #iNumber, , sText
          Print sText
          Close #iNumber
          iNumber = Freefile
          Open aFile For Random As #iNumber Len=32
          Get #iNumber, 2, sText
          Put #iNumber, , "This is a new text"
          Get #iNumber, 1, sText
          Get #iNumber, 2, sText
          Put #iNumber, 20, "This is the text in record 20"
          Print Lof(#iNumber)
          Close #iNumber
      End Sub

      Sub ExampleRandomAccess
          Dim iNumber As Integer
          Dim sText As Variant ' Must be a variant
          Dim aFile As String
          aFile = "~/data.txt"
          iNumber = Freefile
          Open aFile For Random As #iNumber Len=32
          Seek #iNumber,1 ' Position at beginning
          Put #iNumber, , "This is the first line of text" ' Fill line with text
          Put #iNumber, , "This is the second line of text"
          Put #iNumber, , "This is the third line of text"
          Seek #iNumber,2
          Get #iNumber, , sText
          Print sText
          Close #iNumber
          iNumber = Freefile
          Open aFile For Random As #iNumber Len=32
          Get #iNumber, 2, sText
          Put #iNumber, , "This is a new text"
          Get #iNumber, 1, sText
          Get #iNumber, 2, sText
          Put #iNumber, 20, "This is the text in record 20"
          Print Lof(#iNumber)
          Close #iNumber
      End Sub

Fiixoo'mino umo

Close Statement

Get Statement

Open Statement