Loading ...
Sorry, an error occurred while loading the content.

44689RE: [libertybasic] Re: EOF Indicator/GOSUB

Expand Messages
  • William Lopez
    Mar 1, 2012
    • 0 Attachment
      Oh! My goodness! A measley 4 GB! What does this mean? Probably the largest book I have on hand is the original, uncut, unabridged version of Stephen King's "The Stand." In bound, hard-cover format, it is 1,152 pages. The weight is substantial and makes it inconvenient to carry along when flying or waiting in doctor's offices. I also have it in TXT format to read as an eBook, the file size is 2,582 KB. That means Just Basic can only read a file containing fewer than 1,549 complete copies of "The Stand." I cannot think of any reason I would need to store that many copies in a single file. I'm sure one could store the complete Encyclopedia Britannica plus the Oxford English Dictionary in fewer than 4GB, but I find looking up information on the web to be much easier. Of course, one can also purchase "The Stand" as an audio book, but I prefer reading a book myself rather than having "mommy" or some other person read it to me. Audio books are also significantly larger (file size) than TXT books. The point I wish to make is that the problem is more likely one of "data organization" rather than file size. If the US Army finds it necessary to keep a computer record of 30 million current or former service members (they do!), It would be far simpler to store the data alphabetically, or dates of service, or some other identifiable category, thereby breaking the total data into smaller chunks which provides easier storage and easier backup, without a significant loss of data. If there were a requirement to maintain a national registry of every car, truck, motorcycle, boat and airplane ever sold within the United States, probably the first thing the programmer would do would be to organize the data by state, making the file significantly smaller. Year of manufacture or year of sale might work also, providing some tracking of vehicles sold and resold several times were included. If you have an immense task, begin by breaking it down to smaller, separate tasks. You can easily record the serial number of the millions of stones in every pyramid by identifying the pyramid (Egyptian, Mayan, Aztec, or other), and then searching the category your stone falls into. "Divide and conquer" is an old maxim which is easy to accomplish using computers and files and you don't even have to break a sweat, you can do it from your air-conditioned cubicle. Credit reporting agencies maintain information regarding millions of individuals and organizations. I don't believe they keep all that data in a single file. The New York Stock Exchange and the American Stock Exchange record millions of transactions every hour they are open. Do you think they keep all that data in a single file? Try to imagine a simple and effective way to break your data file into identifiable chunks which will still let you search for a single entry.


      Bill

      welopez@...

      To: libertybasic@yahoogroups.com
      From: milesinvestment@...
      Date: Thu, 1 Mar 2012 15:07:26 +0000
      Subject: [libertybasic] Re: EOF Indicator/GOSUB




























      Here's how I am accessing the file:



      open "C:\TEST.TXT" for input as #1

      if EOF(#1) <> 0 then 270



      --- In libertybasic@yahoogroups.com, William Lopez <welopez@...> wrote:

      >

      >

      > File operations are fairly simpl and straight forward, but it is difficult to guess-timate what your error is without a few lines of the code you are using to obtain the input. No one is going to 'steal' your code. Why not post the portion which is giving you trouble?

      >

      > Bill

      >

      > welopez@...

      >

      > To: libertybasic@yahoogroups.com

      > From: milesinvestment@...

      > Date: Wed, 29 Feb 2012 22:32:19 +0000

      > Subject: [libertybasic] Re: EOF Indicator/GOSUB

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      > I am having trouble with the eof() also. It always shows 0. I'm. Thinking it might be the file itself.

      >

      >

      >

      > --- In libertybasic@yahoogroups.com, "Rod" <rodbird@> wrote:

      >

      > >

      >

      > > There is no trick to gosub / return they are very simple commands, What about eof() are you handling that correctly. Showing some code will get you the fastest fix.

      >

      > >

      >

      > > --- In libertybasic@yahoogroups.com, "milesinvestment" <milesinvestment@> wrote:

      >

      > > >

      >

      > > > I am converting a Quickbasic program to Liberty Basic and am having trouble getting the GOSUB and Return mechanics to work correctly. Are there any tricks or software updates I'm missing?

      >

      > > >

      >

      > >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      >

      > [Non-text portions of this message have been removed]

      >


















      [Non-text portions of this message have been removed]
    • Show all 23 messages in this topic