home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,579 of 2,978   
   winston19842005 to joe@usa.com   
   Re: Binary databases   
   22 Dec 07 09:17:11   
   
   From: bjjlyates@bellsouth.net   
      
   On 12/22/07 8:48 AM, in article 13mq5vi2bqc84a7@corp.supernews.com, "Joe"   
    wrote:   
      
   > Jim Leonard wrote:   
   >> On Dec 18, 9:17 pm, Joe  wrote:   
   >>>> All programmers worth their salt start counting from 0.  The more   
   >>>> experienced a programmer you become, the more you'll understand why.   
   >>> Ok, do you have a way to tell when I database has 0 records in. That way   
   >>> I would be able to tell the program what to do. That way I could avoid   
   >>> all these crashes   
   >>   
   >> You maintain a variable that has a count of how many records exist.   
   >> For example, "NumRecords".   
   >   
   > Ok, I guess no one is getting the idea here. Jim. I know that.   
   >   
   > NumRecords:= filesize(U);   
   >   
   > The line above returns all the records. You must remember that the first   
   > record starts at '0'. Not at 1. So my question is how to I tell if the   
   > (U) has one record or no records in it.   
   >   
   > if (NumRecords = 0) then exit;   
   >   
   > the line above by passes the first record. The first record all ways   
   > starts at 0.   
   >   
      
   I think everybody understands you are not a programmer.   
      
   Question: What does filesize return for an empty file? If it returns 0 for   
   both an empty file and a file with 1 record, then you need another method   
   for determining if a file is empty, which probably exists.   
      
   Depends on your flavor of Pascal and/or available functions.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca