Rules | Recent posts | topic RSS | Search | Register  | Log in

Basic C program question: If had defined global variable...

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Elementary Electronic Questions
Author Message
bittware



Joined: 03 Apr 2004
Posts: 199
Helped: 1


Post27 Sep 2004 15:01   Basic C program question: If had defined global variable...

Hello programming gurus,
If I had defined global variable in one .c file and in another .c file, a subroutine function also need use it. There are two approach to implement it.
1, use EXTERN reference
2, use function formal parameter
My question:
Do these two methods have essential difference?
Which approach is more reasonable?
Thanks in advance.
Smile
Back to top
bittware



Joined: 03 Apr 2004
Posts: 199
Helped: 1


Post03 Oct 2004 14:48   Re: Basic C program question: If had defined global variable

Anyone could give me some prompt? Rolling Eyes
Back to top
stefanh



Joined: 21 Jan 2004
Posts: 7


Post03 Oct 2004 17:54   Re: Basic C program question: If had defined global variable

Maybe you should explain what a function formal parameter is. give an example.
Back to top
otakung



Joined: 14 Jan 2003
Posts: 31


Post04 Oct 2004 2:16   Basic C program question: If had defined global variable...

I don't sure I understand your question.
But it's very good if you have example or more information.
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Elementary Electronic Questions
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap