FreeFile Function
ཡིག་སྣོད་ཁ་ཕྱེ་ནིའི་དོན་ལུ་ཤུལ་མམ་གྱི་ཐོབ་ཚུགས་པའི་ཡིག་སྣོད་ཨང་དེ་སླར་ལོགཔ་ཨིན། ཡིག་སྣོད་ཨང་ལག་ལེན་འཐབ་མི་ཡིག་སྣོད་ད་ལྟོ་ཁ་ཕྱེ་ཡིག་སྣོད་ཀྱིས་ཧེ་མ་ལས་ལག་ལེན་མ་འཐབ་མི་ལུ་ཁ་ཕྱེ་ནིའི་དོན་ལུ་འ་ནི་ལས་འགན་དེ་ལག་ལེན་འཐབ།
ཧྲིལ་ཨང་།
འ་ནི་ལས་འགན་དེ་ཁ་ཕྱེ་གསལ་བཤད་ཀྱི་གདོང་ཁ་དེ་འཕྲལ་ལས་ལག་ལེན་འཐབ་བཏུབ་ཨིན། རང་དབང་ཡིག་སྣོད་ཀྱིས་ཤུལ་མམ་ཐོབ་ཚུགས་པའི་ཡིག་སྣོད་ཨང་དེ་སླར་ལོགཔ་ཨིན་རུང་་ ཟུར་གསོག་མི་འབད།
༥ ནུས་མེད་བྱ་སྒོའི་ལམ་ལུགས་བོད་བརྡ་
༦༧ ཡིག་སྣོད་ཚུ་ལེ་ཤ་ ༦༧ ཡིག་སྣོད་ཚུ་ལེ་ཤ་ ༦༧ ཡིག་སྣོད་ཚུ་ལེ་ཤ་
Sub ExampleWorkWithAFile
Dim iNumber As Integer
Dim sLine As String
Dim aFile As String
Dim sMsg As String
aFile = "C:\Users\ThisUser\data.txt"
iNumber = Freefile
Open aFile For Output As #iNumber
དཔར་བསྐྲུན་འབད#ཨའི་ཨང་ "This is a line of text"
#ཨའི་ཨང་དཔར་བསྐྲུན་འབད། "This is another line of text"
Close #iNumber
iNumber = Freefile
Open aFile For Input As iNumber
While Not eof(iNumber)
Line Input #iNumber, sLine
If sLine <>"" Then
sMsg = sMsg & sLine & chr(13)
End If
Wend
Close #iNumber
MsgBox sMsg
End Sub
Sub ExampleWorkWithAFile
Dim iNumber As Integer
Dim sLine As String
Dim aFile As String
Dim sMsg As String
aFile = "~/data.txt"
iNumber = Freefile
Open aFile For Output As #iNumber
Print #iNumber, "This is a line of text"
Print #iNumber, "This is another line of text"
Close #iNumber
iNumber = Freefile
Open aFile For Input As iNumber
While Not eof(iNumber)
Line Input #iNumber, sLine
If sLine <>"" Then
sMsg = sMsg & sLine & chr(13)
End If
Wend
Close #iNumber
MsgBox sMsg
End Sub