Home > Available Help Files > PC-DMIS BASIC Language > Language Reference A – Z > FreeFile Function > Example - FreeFile Function
Current Help File: PC-DMIS Basic (View Core Help)
Example - FreeFile Function
Sub Main()
Dim Mx, FileNumber
For Mx = 1 To 3
FileNumber = FreeFile
Open "c:\e1\TEST" & Mx For Output As #FileNumber
Write #FileNumber, "This is a sample."
Close #FileNumber
Next Mx
Open "c:\e1\test1" For Input As #1
Do While Not EOF(1)
MyStr = Input(10, #1)
MsgBox MyStr
Loop
Close #1
End Sub