[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 2009-11-11T18:00:47-05:00 http://petesqbsite.com/phpBB3/app.php/feed/topic/2990 2009-11-11T18:00:47-05:00 2009-11-11T18:00:47-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=20081#p20081 <![CDATA[A couple of ideas...better late than never?]]>
It may be as simple as a CR w/o a LF, in which case you could test for that, then shell out to u2d (unix to dos, takes care of cr to cr/lf), then finish the run you need.

Or, you could:

Open xyz$ for binary as #1

then do some scanning/reencoding to convert whatever the blank line is to a regular cr/lf and continue on.

Me, I'd add a header or a footer to each file as it's processed, then check for it on opening a file, discard the header/footer if present, and continue.
If the header/footer isn't present, then pass the file through the 'recoder' routine, add header/footer, and write file back out.
That should start to save quite a few machine cycles as the files slowly get worked through. That's just me though. :)

Statistics: Posted by lp0cua0 — Wed Nov 11, 2009 6:00 pm


]]>
2009-07-01T14:54:56-05:00 2009-07-01T14:54:56-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=19388#p19388 <![CDATA[Blank spaces in Freebasic]]> Statistics: Posted by burger2227 — Wed Jul 01, 2009 2:54 pm


]]>
2009-07-01T14:39:54-05:00 2009-07-01T14:39:54-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=19386#p19386 <![CDATA[Blank spaces in Freebasic]]> how ever if you like you can send your attachment to my yahoo mail at
talon_nanaki at yahoo dot com, just keep in mind that I don't claim to know all(that would be silly to say) and I might not be able to help.

Statistics: Posted by T'lon Nanaki — Wed Jul 01, 2009 2:39 pm


]]>
2009-07-01T06:25:59-05:00 2009-07-01T06:25:59-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=19383#p19383 <![CDATA[Blank spaces in Freebasic]]>
Unfortunately the files are spread over literally hundreds of directories so working through them might not be practical.

I see the forum provides the facility to send e-mails. Do you know whether attachments are permitted? If so, I could e-mail you with an example file attached (the files are small).

Midge

Statistics: Posted by midgemaster — Wed Jul 01, 2009 6:25 am


]]>
2009-06-30T11:37:23-05:00 2009-06-30T11:37:23-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=19378#p19378 <![CDATA[Blank spaces in Freebasic]]> perhaps you should try using line input# an using val() to convert string numbers into integer/single, either that or running a code that opens your files and places a 0 or "" at each blank line.

this small code will do that(tested it myself too!)

Code:

Dim As String retstrOpen (unformmated file name) For Input As #1Open (formatted file name) For Output As #2Do Until Eof(1)Line input #1,retstrIf retstr="" ThenPrint #2,"0"ElsePrint #2,retstrEndIfLoop
if you plug this into a code that gets all files in a directory (assuming that your 2million+ files are all located in one place) you can format all the files in one run. but be a good programmer and back them up first just in case :)

Statistics: Posted by T'lon Nanaki — Tue Jun 30, 2009 11:37 am


]]>
2009-06-30T02:16:23-05:00 2009-06-30T02:16:23-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=19372#p19372 <![CDATA[Blank spaces in Freebasic]]>
Yes, WRITE would do the trick.

The problem is that I have some 2,500,000 legacy files created using PRINT in QBasic, and peppered with blanks. Naturally I don't wish to have to re-create them.

Midgemaster

Statistics: Posted by midgemaster — Tue Jun 30, 2009 2:16 am


]]>
2009-06-29T16:24:20-05:00 2009-06-29T16:24:20-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=19366#p19366 <![CDATA[Blank spaces in Freebasic]]> INPUT # always stops at a comma no matter where it is! Even in a string.
So the best way to read a printed file would be LINE INPUT # anyhow.

You don't need to convert number strings back using the following method:

WRITE #1, person$, score%, DATE$, TIME$

To read it use INPUT #1, player$, last%, Day$, Hour$

The number of values must match each statement and the variable types.

Then format the values any way you want on the screen.

Statistics: Posted by burger2227 — Mon Jun 29, 2009 4:24 pm


]]>
2009-06-29T11:45:34-05:00 2009-06-29T11:45:34-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=19359#p19359 <![CDATA[Blank spaces in Freebasic]]>
Reading with Input in Freebasic. Created with Print in QBasic.

Midgemaster

Statistics: Posted by midgemaster — Mon Jun 29, 2009 11:45 am


]]>
2009-06-29T10:56:36-05:00 2009-06-29T10:56:36-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=19357#p19357 <![CDATA[Blank spaces in Freebasic]]>
How was the file created? With PRINT?

Statistics: Posted by burger2227 — Mon Jun 29, 2009 10:56 am


]]>
2009-06-29T01:42:05-05:00 2009-06-29T01:42:05-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=19354#p19354 <![CDATA[Blank spaces in Freebasic]]>
I'm trying to read sequential files created by QBasic. Each line in the files has only one piece of data. Part of an example file looks like this :

.
.
PETONG (GB)

1
0
BOLSHOI Ballet
.
.

When the code gets to the blank between 'PETONG (GB) and '1', Freebasic seems to ignore it and picks up the '1' instead. If I replace the clank line with "" it works fine.

I hope that's clearer.

Midgemaster

Statistics: Posted by midgemaster — Mon Jun 29, 2009 1:42 am


]]>
2009-06-28T15:40:35-05:00 2009-06-28T15:40:35-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=19352#p19352 <![CDATA[Blank spaces in Freebasic]]> are you trying to read a source file, a file created through FB, my mothers recipe for pea soup? curiosity kills and Im 6ft under so dig away!

Statistics: Posted by T'lon Nanaki — Sun Jun 28, 2009 3:40 pm


]]>
2009-06-26T04:45:49-05:00 2009-06-26T04:45:49-05:00 http://petesqbsite.com/phpBB3/viewtopic.php?p=19348#p19348 <![CDATA[Blank spaces in Freebasic]]>
In Freebasic, if reading a file line by line, blank lines seems to be ignored and the following line is used instead. If I replace a blank line with "", everything works perfectly.

Is this the way it is supposed to work?

Thanks

Midgemaster

Statistics: Posted by midgemaster — Fri Jun 26, 2009 4:45 am


]]>