Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!mcsun!ukc!slxsys!ibmpcug!dylan From: dylan@ibmpcug.co.uk (Matthew Farwell) Newsgroups: comp.lang.c Subject: Re: Novice question. Message-ID: <1990Nov14.110638.5713@ibmpcug.co.uk> Date: 14 Nov 90 11:06:38 GMT References: <1990Oct31.014132.2400@agate.berkeley.edu> <336@brat.UUCP> <3838@vela.acs.oakland.edu> <1990Nov14.010511.7241@ux1.cso.uiuc.edu> Reply-To: dylan@ibmpcug.CO.UK (Matthew Farwell) Organization: The IBM PC User Group, UK. Lines: 24 In article <1990Nov14.010511.7241@ux1.cso.uiuc.edu> gordon@osiris.cso.uiuc.edu (John Gordon) writes: >jmwojtal@vela.acs.oakland.edu (Wojo) writes: >>What exactly are the reasons "register" and "extrn" are used to declare >>values. I see register alot in some of the programs and I don't know why >>they do it. Is it just good practice or what. > > "register" means that the variable will be stored in a portion of ^^^^ >memory that can be accessed significantly faster than normal. Useful for >loop counters, among other things. There are a limited number of registers >available. MS-DOS machines, for example, have around 16 (I think). Surely this should be 'might be stored in a high speed register', depending on whether the compiler wants to put it there, is able to put it there, whether there is an s in the day today, etc. etc. I always thought that register was just advice to the compiler, which its free to ignore if it wants to or is unable to fulfil the request. Dylan. -- Matthew J Farwell | Email: dylan@ibmpcug.co.uk The IBM PC User Group, PO Box 360,| ...!uunet!ukc!ibmpcug!dylan Harrow HA1 4LQ England | CONNECT - Usenet Access in the UK!! Phone: +44 81-863-1191 | Sun? Don't they make coffee machines?