From: Charles Krug Newsgroups: comp.os.msdos.djgpp Subject: Re: 'Register' in C Date: Tue, 06 Jan 1998 17:23:22 -0500 Lines: 35 Message-ID: <34B2AEDA.B0D341BD@pentek.com> References: <01bd1ae1$2f536440$d83d63c3 AT default> <34B29809 DOT 8841108D AT pentek DOT com> NNTP-Posting-Host: mail.pentek.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Whoops! I made a mistake. corrections follow: > char buf[100]; > register *char bufptr = buf; > This should read: char buf[100]; register bufptr = buf; /*(I think . . .) */ > Now bufptr is a register variable of type "pointer to char", which is probably > what you're after. ALSO--remember that "register" is a suggestion, not a > requirement. SOME compilers will ignore your suggestion, and giving the > compiler impossible combinations of register variables will give "unpredictable > results." Also, be aware that declaring variables "register" does not always > boost performance. > > Have you tried compileing w/ full optimizations yet? Its likely to give better > results than you or I could come up with. > > -- > Charles Krug, Jr. -- Charles Krug, Jr. Application Engineer Pentek Corp 1 Park Way Upper Saddle River, NJ 07458