Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!usc!apple!well!ewhac From: ewhac@well.sf.ca.us (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga Subject: Re: lattice C NOVICE question Message-ID: <23702@well.sf.ca.us> Date: 20 Mar 91 01:27:56 GMT References: <732@elctr.UUCP> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Organization: Boing Boom Tschak Lines: 30 Quote: "I don't understand their humor, either." -- Worf In article <732@elctr.UUCP> dsn@elctr.UUCP (Dan Soeren Nielsen) writes: >#include "libraries/dosextens.h" This should be: #include >extern struct FileHandle *Open(); > That will work, but technically, it should be: extern BPTR Open(); > if (dos_fh = Open("*",MODE_OLDFILE)) > { > fprintf(dos_fh,"%ls","Hello there!\n"); This will kill you if you linked with Lattice's lc.lib. The particular version of fprintf() being used in this example is found in amiga.lib, so to make this work, don't specify lc.lib during the link stage. If you want to use Lattice's fprintf(), then you should use fopen() instead of Open(). _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape INET: well!ewhac@ucbvax.Berkeley.EDU \_ -_ Recumbent Bikes: UUCP: pacbell > !{well,unicom}!ewhac O----^o The Only Way To Fly. hplabs / (pronounced "AE-wack") Silent Software Moving ahead at the speed of light, because we are infinitely massive.