www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/26/10:25:56

From: David Jenkins <me AT jenkinsdavid DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: register int variable Errors
Date: Wed, 26 Feb 1997 14:05:12 +0000
Organization: None
Distribution: world
Message-ID: <ws6jCCAYMEFzEwZ0@jenkinsdavid.demon.co.uk>
NNTP-Posting-Host: jenkinsdavid.demon.co.uk
MIME-Version: 1.0
Lines: 26
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I have some example source code which uses
register int index;
DJGPP has no problem compiling this.

Yet when I change 
int d;

to

register int d;

DJGPP gives the error "register name not specified for 'd'

The example source seems use the 'index' just like I'm using 'd',for a
faster for loop.
for (d=0 ; d<dn ; d++) {
...
}

So why doesn't DJGPP let me change an int variable to a register int
variable??

-- 

David Jenkins

- Raw text -


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