Xref: utzoo comp.sys.amiga:56896 comp.sys.amiga.tech:11821 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cbmvax!valentin From: valentin@cbmvax.commodore.com (Valentin Pepelea) Newsgroups: comp.sys.amiga,comp.sys.amiga.tech Subject: Re: lattice cback.o question Keywords: lattice, cback.o, background proces Message-ID: <11451@cbmvax.commodore.com> Date: 9 May 90 06:28:01 GMT References: <1207@dnlunx.pttrnl.nl> Reply-To: valentin@cbmvax (Valentin Pepelea) Distribution: comp Organization: Commodore, West Chester, PA Lines: 36 In article <1207@dnlunx.pttrnl.nl> arian@dnlunx.pttrnl.nl (Koster A.) writes: > > At the moment I'm experimenting with cback.o startup routine from > lattice 5.02. I thought when you close the _Backstdout filehandler you > can close the window in wich you started the command. But I can't get > it to work. > > ... > >long _stack = 4000; > char *_procname = "my_program"; > long _priority = 0; > long _BackGroundIO = 1; > extern long _Backstdout; > > #define MSG "HELLO WORLD\n" > > void main() > { > long i; > Write(_Backstdout, MSG, strlen(MSG)); > Close(_Backstdout); > for (i=0;i<5000000;i++); > } The problem is not with you, but rather the documentation. Replace the line "void main()" with "void _main()". It's that simple. One of these days, I'll call Lattice and tell them about the error. I myself have spent half a day on that one. Valentin -- The Goddess of democracy? "The tyrants Name: Valentin Pepelea may distroy a statue, but they cannot Phone: (215) 431-9327 kill a god." UseNet: cbmvax!valentin@uunet.uu.net - Ancient Chinese Proverb Claimer: I not Commodore spokesman be