Path: utzoo!utgpu!attcan!uunet!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.sys.amiga.tech Subject: Re: clear screen in 280 bytes? Keywords: See how small I could make a C program Message-ID: <5182@cbmvax.UUCP> Date: 4 Nov 88 09:49:26 GMT References: <1623@scolex> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Organization: Commodore Technology, West Chester, PA Lines: 36 In article <1623@scolex> brianm@sco.COM (Brian Moffet) writes: > * Brian Moffet > * 11-01-88 > * > * test to see how small I could make a clear screen. ... >void >_main() >{ > register long F; Please, evil as it is, that should be a BPTR. > DOSBase = OpenLibrary( "dos.library", 0 ); > if( DOSBase != NULL ) > { > F = Open( "*", MODE_OLDFILE ); > if( F != -1 ) URK! Ok, First, you'd do better to do F = Output(). Second, the error return from Open is 0, not -1!!!! > { > Write( F, "\f", 1 ); > Close( F ); If you use F=Output(), DO NOT Close() it! > } > CloseLibrary( DOSBase ); > } >} -- You've heard of CATS? Well, I'm a member of DOGS: Developers Of Great Software. Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup