[comp.os.msdos.programmer] Clipper '87 and Turbo C problem

U5533129@ucsvc.ucs.unimelb.edu.au (CARDIOLOGY, R.M.H.) (08/17/90)

Are there any particular problems with linking Turbo C with Summer '87 
Clipper, apart from using large memory model.  After calling a Turbo C routine 
in the procedure start, the following piece of code will run...

do start

seek user
if found()
  if file(alltrim(maildir)+"\*.new")
    ? cr                             && The program crashs without this line.
    tone(150,8)
    tone(130,10)
    wait "You have electronic mail, do you want to read it? (Y/N) " to answer
    ? cr
    if answer$"YyTtGgHhJjUu&7^6%5"
      do newmail
    endif
  endif
endif


..but this piece...


do start

seek user
if found()
  if file(alltrim(maildir)+"\*.new")
    tone(150,8)
    tone(130,10)
    wait "You have electronic mail, do you want to read it? (Y/N) " to answer
    ? cr
    if answer$"YyTtGgHhJjUu&7^6%5"
      do newmail
    endif
  endif
endif


.. will crash before giving the tone if the file() function evaluates true.

There _appear_ to be no problems at any point later with the write statement 
in, but I have grave concerns about giving the program to users.

The second routine ran fine without the Turbo C routines.

Any ideas anyone?

Thanks,

Peter Summers