[comp.databases] Possible Clipper Bug?

drezac@dcscg1.UUCP (Duane L. Rezac) (06/09/89)

Hello: 

I recently ran into a problem with clipper, and it appears to be a Bug. Has 
anyone else ran into this problem (or is it a "feature")

I created an index on a database. after initializing a few variables, I entered
a processing loop that was coded as :   "do while .not. eof() " In DBASEIII, 
the program ran fine. In clipper, it bypassed the loop. Upon examination with
debug, I discovered that after Clipper finished indexing the file, it left 
the database at eof, with eof()=.T. (of course, this caused the do while .not.  eof() to fail ;-( ) a "goto top" inserted after the index command corrected the
problem. 

Has anyone else ran into this type of problem? It appears that after Clipper 
indexes a file, it leaves it at eof. 

Duane L. Rezac

santol@cbnewsc.ATT.COM (shawn.r.antol) (06/12/89)

From article <506@dcscg1.UUCP>, by drezac@dcscg1.UUCP (Duane L. Rezac):
> a processing loop that was coded as :   "do while .not. eof() " In DBASEIII, 
> the program ran fine. In clipper, it bypassed the loop. Upon examination with
> debug, I discovered that after Clipper finished indexing the file, it left 
> the database at eof, with eof()=.T. (of course, this caused the do while
> .not.  eof() to fail ;-( ) a "goto top" inserted after the index command
> corrected the problem...

I have experienced this "feature"...  there are other little quirks like this 
too.

P.S.  
Have you used the DOS LINK(er) instead of the PLINK86 linker?
Here is the batch file I use to compile and link using the DOS linker, it is 
much faster!

CL.BAT

clipper %1
if not errorlevel 1 link %1, %1.exe,,\dbase\clipper.lib \dbase\extend.lib

The only dis-advantage is that the DOS linker does not support overlays...
Big deal!

Shawn Antol

drezac@dcscg1.UUCP (Duane L. Rezac) (06/13/89)

From article <1225@cbnewsc.ATT.COM>, by santol@cbnewsc.ATT.COM (shawn.r.antol):
> P.S.  
> Have you used the DOS LINK(er) instead of the PLINK86 linker?
> Here is the batch file I use to compile and link using the DOS linker, it is 
> much faster!
> 
> CL.BAT
> 
> clipper %1
> if not errorlevel 1 link %1, %1.exe,,\dbase\clipper.lib \dbase\extend.lib
> 
> Shawn Antol

I always use the dos linker as it is faster. I use the following batch file
that gives me several link options..

rem clip.bat
echo off
clipper %1
if not errorlevel 0 goto crash
if "%2" == "+" goto exten
if "%2" == "d" goto debug
if "%2" == "d+" goto exdebug
if "%2" == "+d" goto exdebug
if "%2" == "" goto plain
:exten
 echo Linking %1 with Extended Library
 link %1,,,clipper.lib extend.lib
 goto end
:debug
  echo Linking %1 with Debugger
  link %1 debug.obj,,,clipper.lib
  goto end
:exdebug
  echo Linking %1 with Extended Library and Debugger
  link %1 debug.obj,,,clipper.lib extend.lib
  goto end
:plain
  echo Linking %1 with Standard Library
  link %1,,,clipper.lib
  goto end
:crash
  echo a compiler error has occured......please correct and try again....
  goto end
:end



This gives me several options... compile and link with standard Library 
  (clip program ) , debugger (clip program d) extended library (clip program +)
  or extended and debugger (clip program d+ or +d) 

  Have Fun...


+-----------------------+---------------------------------------------------+
| Duane L. Rezac        |These views are my own, and NOT representitive of  |
| dsacg1!dcscg1!cpp90221|my place of Employment.                            |
+-----------------------+---------------------------------------------------+

emuleomo@yes.rutgers.edu (Emuleomo) (06/14/89)

> With reference to the use of PLINK86 or the DOS LINK(ER) for linking
> Clipper .OBJs
>

Even faster for clipper linking is "tlink" Turbo Linker from the magicians
at Borland International!!  However, overlays are not supported.  Big deal huh!

--Emuleomo O.O. (emuleomo@yes.rutgers.edu)
-- 
** Research is what I'm doing when I dont know what I'm doing! **

aiko@cs.odu.edu (John K Hayes) (06/15/89)

In article <506@dcscg1.UUCP> drezac@dcscg1.UUCP (Duane L. Rezac) writes:
>
>Hello: 
>
>I recently ran into a problem with clipper, and it appears to be a Bug. Has 
>anyone else ran into this problem (or is it a "feature")
>
>I created an index on a database. after initializing a few variables, I entered
>a processing loop that was coded as :   "do while .not. eof() " In DBASEIII, 
>the program ran fine. In clipper, it bypassed the loop. Upon examination with
>debug, I discovered that after Clipper finished indexing the file, it left 
>the database at eof, with eof()=.T. (of course, this caused the do while .not.  eof() to fail ;-( ) a "goto top" inserted after the index command corrected the
>problem. 
>
>Has anyone else ran into this type of problem? It appears that after Clipper 
>indexes a file, it leaves it at eof. 
>
>Duane L. Rezac




From my experience with clipper (I've been using it everyday for over a year no)
it leaves the record pointer at the top of file after indexing.  Of course, I
have only used two versions: Summer '87 and Autumn '86.  Both of these have
working the same way dBASE does with respect to indexing and the pointer.

-- 
    ---{john hayes}  Old Dominion University; Norfolk, Virginia USA
                     internet: aiko@cs.odu.edu
                     Home: (804) 622-8348     Work: (804) 460-2241 ext 134  

                      <++++++++++++++++++++++++++++++++++>
Are you a Have or a Have_Not?  Because if you're a Have_Not, you've probably
had it; whereas, if you're a Have, you've probably got it and are going to 
give it away at some point in the future!       --- The Clash
                      <++++++++++++++++++++++++++++++++++>