[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 2006-12-10T21:56:00-05:00 http://www.petesqbsite.com/phpBB3/app.php/feed/topic/2015 2006-12-10T21:56:00-05:00 2006-12-10T21:56:00-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=13507#p13507 <![CDATA[Reading from Files?]]>

Statistics: Posted by SCC — Sun Dec 10, 2006 9:56 pm


]]>
2006-12-10T00:09:37-05:00 2006-12-10T00:09:37-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=13472#p13472 <![CDATA[Reading from Files?]]>
I'd rather keep learning in Qbasic for the moment at least, this is the first time i'm actually retaining all this info and getting some programs working.


Anyways, I figured it out :D '$INCLUDE: 'code.txt'

Guess it's a library command, but it worked pretty good here, hehe.
good job i'm the same way....i want to learn all i can from qb
then i'll try something else...i still have VERY far to go..

Statistics: Posted by sid6.7 — Sun Dec 10, 2006 12:09 am


]]>
2006-12-09T19:57:48-05:00 2006-12-09T19:57:48-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=13455#p13455 <![CDATA[Reading from Files?]]>
fb is the modern version of qb, there are almost no differences
For crying out loud, Ray, you sound like a Jesus freak! You're like an evangelist who keeps pounding us with FreeBasic. It can get really annoying. Don't you have anything original to share in your posts?

*****

Statistics: Posted by moneo — Sat Dec 09, 2006 7:57 pm


]]>
2006-12-09T19:51:10-05:00 2006-12-09T19:51:10-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=13454#p13454 <![CDATA[Reading from Files?]]>
......
Anyways, I figured it out :D '$INCLUDE: 'code.txt'

Guess it's a library command, but it worked pretty good here, hehe.
Actually, $INCLUDE is not a library command, it's what Basic calls a metacommand. It provides a nice, simple way for programs to be able to share some common code. Most languages have similar facilities. COBOL calls these "copyfiles".

An INCLUDE inserts the entire block of code from the specified text file. There are some restrictions as to what code can be included.

Some languages have MACRO libraries which allow you to insert a block of customized source code based on provided parameters.

Other languages, including QuickBasic, allow you include a function or a SUB from a library. Only the call to the function or SUB actually appears in your source code, and the required code is LINKED into your executable program. That is, you don't actually see it as part of your source code.

Regards..... Moneo

Statistics: Posted by moneo — Sat Dec 09, 2006 7:51 pm


]]>
2006-12-09T19:22:03-05:00 2006-12-09T19:22:03-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=13453#p13453 <![CDATA[Reading from Files?]]> Statistics: Posted by RayBritton — Sat Dec 09, 2006 7:22 pm


]]>
2006-12-09T16:47:46-05:00 2006-12-09T16:47:46-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=13452#p13452 <![CDATA[Reading from Files?]]>

Anyways, I figured it out :D '$INCLUDE: 'code.txt'

Guess it's a library command, but it worked pretty good here, hehe.

Statistics: Posted by SCC — Sat Dec 09, 2006 4:47 pm


]]>
2006-12-09T15:18:54-05:00 2006-12-09T15:18:54-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=13448#p13448 <![CDATA[Reading from Files?]]> FreeBasic

Statistics: Posted by RayBritton — Sat Dec 09, 2006 3:18 pm


]]>
2006-12-09T14:36:34-05:00 2006-12-09T14:36:34-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=13446#p13446 <![CDATA[Reading from Files?]]>
One problem i had from the start is reading from files. From what the tut says, i can only read one line, or read numerical data into an array. What i needed to do was read an entire SUB from a file.

I've got a fair-sized graphic designed (one of what is going to be quite a few of them), and it takes up not a few lines, and i don't want the main program flooded with all that. It would be much easier to just write a txt file and read it into it, but i just can't seem to figure out how that works.

I used to use a program called DarkBASIC that had a command called APPEND, then i just called the SUB name and it read all the commands, but i don't think qbasic has anything like that, does it?

If not, is there anything else i can do here? This is all assuming SUBS use up the size limit, which i don't know if it does or not.

Statistics: Posted by SCC — Sat Dec 09, 2006 2:36 pm


]]>