From: David Jenkins Newsgroups: comp.os.msdos.djgpp Subject: register int variable Is there any point??? Date: Thu, 27 Feb 1997 02:56:07 +0000 Organization: None Distribution: world Message-ID: References: NNTP-Posting-Host: jenkinsdavid.demon.co.uk MIME-Version: 1.0 Lines: 27 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article , David Jenkins writes > >So why doesn't DJGPP let me change an int variable to a register int >variable?? > Yes I was using the "d" variable as a global.This is were I was going wrong. I've been working through a tutorial using what programing knowledge I have from my basic days and applying them to a simple demo type program I'm using to apply newfound knowledge. Since I'm used to using globals most of the time in basic,I've been finding it hard to convert to the C methods.Which I now understand a little better. I used a simple rawclock()-timebefore_loop_was_started for timing a heavy loop using normal int variable in for(d=1 to 1000) and again using a register int in for(d=1 to 1000) the resulting time difference was almost unnoticable. Is there any point in using a register int in a for loop??? Or am I using a timing method which is incorrect?? -- David Jenkins