Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!hub!mango!erbo From: erbo@mango.ucsb.edu (Eric J. Bowersox) Newsgroups: comp.databases Subject: Re: dBASE IV -- Trials and Tribulations Summary: the plot thickens.... Keywords: bugs Message-ID: <2095@hub.UUCP> Date: 20 Jul 89 00:00:38 GMT References: <2071@hub.UUCP> <167@dbase.UUCP> Sender: news@hub.UUCP Reply-To: erbo@mango.UUCP (Eric J. Bowersox) Organization: UC Santa Barbara, Campus Club for Computer People (CCCP) Lines: 113 In article <167@dbase.UUCP> awd@dbase.UUCP (Alastair Dallas) writes: :In article <2071@hub.UUCP>, erbo@lime.ucsb.edu (Eric J. Bowersox) writes: :> BUG #1: The Case of the Missing Procedure (or: Son of Line Eater? :-) ) :I couldn't get this to fail. I created a 150-line prg containing 14 simple, :but not empty procedures. The main proc just called the others, and the last :one was never ignored. After seeing this message for the first time, I ran back to my machine at work (a true-blue IBM PC-XT with 20Mb hard disk -- slow! :-( ) and tried to duplicate the problem. Here's what I came up with: *** DBFail.prg *** A failing test case that demonstrates the procedure bug. *************************************** *** *** Set up error logging. *** set talk off set space off set alternate to "dbfail.run" set alternate on on error ? "Error ",error()," at ",program(),"-",lineno(),": ",message() *** *** Test procedure calls. *** ? "Now starting the procedure call test..." do test1 do test2 do test3 do test4 do test5 do test6 do test7 do test8 do test9 do test10 *** *** Finish up. *** ? "End of DBFAIL.PRG" set alternate off close alternate return *** The test procedures, ten in number. procedure test1 ? "Procedure TEST1 called!" return [The remaining procedures omitted for brevity, but they're just like the first one] *** EOF: DBFail.prg Well, after compiling this with "compile dbfail" and getting no errors (I know you don't need to do that, since dBASE will do it for you, but I just wanted to make sure :-) ), I ran the program and got the following results in DBFAIL.RUN: Now starting the procedure call test... Procedure TEST1 called! Procedure TEST2 called! Procedure TEST3 called! Procedure TEST4 called! Procedure TEST5 called! Procedure TEST6 called! Procedure TEST7 called! Procedure TEST8 called! Procedure TEST9 called! Error 1 at DBFAIL- 25: File does not exist End of DBFAIL.PRG A-ha! You think! Well, I thought of something else, and rebooted my machine, selecting "local boot" instead of "network boot." (Oops! Forgot to mention, my machine is a workstation on a LAN, but dBASE IV was installed single-user on my own hard disk.) Cranking up dBASE IV, recompiling DBFAIL.PRG, and running it again produced the following: Now starting the procedure call test... Procedure TEST1 called! Procedure TEST2 called! Procedure TEST3 called! Procedure TEST4 called! Procedure TEST5 called! Procedure TEST6 called! Procedure TEST7 called! Procedure TEST8 called! Procedure TEST9 called! Procedure TEST10 called! End of DBFAIL.PRG Checking both .DBO files out with LIST (the program LIST.COM, not dBASE's LIST command :-) ) in hex dump mode revealed, sure enough, the one compiled with the LAN on was missing the last entry in its "jump table" (for procedure TEST10), but the one compiled with the machine booted locally had it in its correct place. Logically, though, both files should have been identical whether the LAN was present or not. I am afraid I am totally at a loss to explain this, but I have a sneaking suspicion that Alastair is probably right. (sigh) :Thanks for presenting such clear cases. I think the people on comp.databases :who don't hit 'N' when the subject line says 'dBASE' appreciate hearing :about any bugs or unexpected features (:-). You're welcome. Actually, I tune in _just_ to find out anything new I can about dBASE...as my paycheck depends on it, this is understandable :-). I think it's probably worth it in the end, though. | Disclaimer: This posting is definitive. Reality may have got it wrong. | | * Eric J. Bowersox (ERBO) * LIVE! from Isla Vista, California! | | erbo@cornu.ucsb.edu ...!{ucbvax,ucsd}!ucsbcsl!cornu!erbo | | If wishes were DRAMs, I don't think we would worry about the Japanese. -me |