Giusy Active Member Licensed User Aug 11, 2018 #1 Hi, in B4A I read my txt file so: Code: Copy Private tr As TextReader tr.Initialize(File.OpenInput(File.DirAssets, "myfile.txt")) strLines = tr.ReadLine FOR SS=1 TO 7 strLines = tr.ReadLine .... .... NEXT SS tr.Close [code] Now in B4I how should i do?
Hi, in B4A I read my txt file so: Code: Copy Private tr As TextReader tr.Initialize(File.OpenInput(File.DirAssets, "myfile.txt")) strLines = tr.ReadLine FOR SS=1 TO 7 strLines = tr.ReadLine .... .... NEXT SS tr.Close [code] Now in B4I how should i do?
D Deleted member 103 Guest Aug 11, 2018 #2 Giusy said: Hi, in B4A I read my txt file so: Code: Copy Private tr As TextReader tr.Initialize(File.OpenInput(File.DirAssets, "myfile.txt")) strLines = tr.ReadLine FOR SS=1 TO 7 strLines = tr.ReadLine .... .... NEXT SS tr.Close [code] Now in B4I how should i do? Click to expand... Very easily: Code: Copy Dim txt As String = File.ReadString(File.DirAssets, "myfile.txt") Upvote 0
Giusy said: Hi, in B4A I read my txt file so: Code: Copy Private tr As TextReader tr.Initialize(File.OpenInput(File.DirAssets, "myfile.txt")) strLines = tr.ReadLine FOR SS=1 TO 7 strLines = tr.ReadLine .... .... NEXT SS tr.Close [code] Now in B4I how should i do? Click to expand... Very easily: Code: Copy Dim txt As String = File.ReadString(File.DirAssets, "myfile.txt")
Giusy Active Member Licensed User Aug 11, 2018 #3 Scusa @Filippo ma come movimento la lettura dei sette record? but as a movement the reading of the seven records? Upvote 0
Scusa @Filippo ma come movimento la lettura dei sette record? but as a movement the reading of the seven records?
D Deleted member 103 Guest Aug 12, 2018 #4 Giusy said: Scusa @Filippo ma come movimento la lettura dei sette record? but as a movement the reading of the seven records? Click to expand... Code: Copy Dim txt As String = File.ReadString(File.DirAssets, "myfile.txt") Dim str() as string = regex(crlf, txt) Upvote 0
Giusy said: Scusa @Filippo ma come movimento la lettura dei sette record? but as a movement the reading of the seven records? Click to expand... Code: Copy Dim txt As String = File.ReadString(File.DirAssets, "myfile.txt") Dim str() as string = regex(crlf, txt)
Erel B4X founder Staff member Licensed User Longtime User Aug 12, 2018 #5 Never use TextWriter or TextReader unless you need to read a non UTF8 encoded file. Code: Copy Dim lines As List = File.ReadList(...) Upvote 0
Never use TextWriter or TextReader unless you need to read a non UTF8 encoded file. Code: Copy Dim lines As List = File.ReadList(...)