[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2012-12-24T23:05:13-05:00 http://petesqbsite.com/phpBB3/app.php/feed/topic/3677 2012-12-24T23:05:13-05:00 2012-12-24T23:05:13-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=22288#p22288 <![CDATA[Thank you.]]> I want to get a copy of QB64, but I cannot open the link http://www.qb64.net/forum/ , so whether you can send it to me? My email address is 17390573@qq.com.

Statistics: Posted by WZY — Mon Dec 24, 2012 11:05 pm


]]>
2012-12-21T11:08:48-05:00 2012-12-21T11:08:48-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=22282#p22282 <![CDATA[How to get the values in the .txt document?]]>

Code:

file$ = "TestData.txt"OPEN file$ FOR OUTPUT AS #1 'create a test filePRINT #1, "200"  + CHR$(9) + "6180"CLOSE #1OPEN file$ FOR INPUT AS #1 'file name must existIF LOF(1) THEN 'file must have a length  LINE INPUT #1, text$ 'get entire line of text  posit = INSTR(2, text$, CHR$(9)) 'find position of spacer  num1$ = MID$(text$, 1, posit - 1) 'first number  num2$ = MID$(text$, posit + 1) 'second number  n1 = VAL(num1$) 'convert to a real numbers  n2 = VAL(num2$) 'VAL will ignore leading spacesEND IFPRINT n1, n2CLOSE #1
CHR$(9) is a real tab and not a space. If it is just a space, use SPACE$(1) instead. 2 is used in INSTR because a printed number may have a leading space.

Use WRITE #, to create comma separated file number values in a file that can be opened and read using INPUT:

Code:

file$ = "TestData.txt"OPEN file$ FOR OUTPUT AS #1WRITE #1, 200, 6180 'variable values can be substituted for real valuesCLOSE #1OPEN file$ FOR INPUT AS #1INPUT #1, n1, n2CLOSE #1PRINT n1, n2

Statistics: Posted by burger2227 — Fri Dec 21, 2012 11:08 am


]]>
2012-12-21T02:01:54-05:00 2012-12-21T02:01:54-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=22281#p22281 <![CDATA[How to get the values in the .txt document?]]>
2006180
2017000
...

There is a Tab between two values in the same line.
How can I respectively take the value of 200 and 6180?
Thank you.

Statistics: Posted by WZY — Fri Dec 21, 2012 2:01 am


]]>