Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   HELP!!! Counters, global variables, and the like (http://www.chiefdelphi.com/forums/showthread.php?t=25930)

danielkitchener 23-02-2004 23:40

HELP!!! Counters, global variables, and the like
 
Well, here's a question with an answer that's probably very obvious. How do I create a counter used by both the default routine and process IO functions? I tried declaring a global variable, but MPLAB had a major case of PMS when I did. Perhaps I'm doing it wrong? Below the includes, I simply declared
int counter=0;
Is there a better way of doing this?
Also, how do I pass values between functions? Once again, the compiler gets testy
This is urgent, as we ship in 2 days

doy 23-02-2004 23:42

Re: HELP!!! Counters, global variables, and the like
 
well... if they are in separate files, you need to declare it in each file... do
Code:

int count=0;
in one file, then do
Code:

extern int count;
in all the others.

blindguyinanorg 23-02-2004 23:53

Re: HELP!!! Counters, global variables, and the like
 
dont forget you get to work on programing after you ship


All times are GMT -5. The time now is 21:51.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi