www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/06/21:45:23

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 'Register' in C
Date: Tue, 06 Jan 1998 18:07:24 -0800
Organization: Alcyone Systems
Lines: 28
Message-ID: <34B2E35C.158B21F@alcyone.com>
References: <01bd1ae1$2f536440$d83d63c3 AT default> <34B29809 DOT 8841108D AT pentek DOT com> <34B2AEDA DOT B0D341BD AT pentek DOT com>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Charles Krug wrote:

> 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 . . .) */

No, this would declare bufptr to be of type int.

The declaration you're looking for is

    register char *bufptr = buf;

A pointer to char which is a register variable.

-- 
         Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com
                       Alcyone Systems / http://www.alcyone.com/max/
  San Jose, California, United States / icbm://+37.20.07/-121.53.38
                                     \
                       "Life may be / the product of imperfections."
                                   / (Marclo Gleiser)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019