[comp.lang.pascal] BASIC shell <-> Pascal interference

djo7613@blake.acs.washington.edu (Dick O'Connor) (03/30/89)

Has anyone had any experiences in which shelling to DOS from the
BASIC interpreter and executing a program changed the behavior of
said program?  I apologize for the cross-posting, but I'm not sure
there's a good spot for this.  Details follow; I imagine E-mail is
a more appropriate forum for continued discussion...

A user has been running a Turbo Pascal program that does random
selection of sampling sites within a given (input) fishing area.
I've just gotten a look at the code, and I'm not sure how the author
seeded the random number generator.  If you run the program 
successively from the DOS prompt, you get a different set of sites
each time you run it (so far, so good).

This user wants to run the same algorithm in a new program he wrote
using BASICA by shelling out from BASIC at the appropriate time,
running the Pascal program, and EXITing back into BASIC.  When he shells
out to DOS and runs the selection program successive times, he gets
the same sites selected every single time.  There is some sort of
interaction going on that hasn't occurred in the three years he's run
the program from DOS.

Does any of this sound familiar or ring any bells?  We would really
appreciate any advice you may have!


Dick O'Connor
Washington Department of Fisheries
Olympia, Washington  98504
Internet Mail: djo7613@blake.acs.washington.edu
****************************************************************************
DISCLAIMER:  I speak only for myself, not for the Department.  Here, anyway!
****************************************************************************
               So long, and thanks from all the fish...