Re: [gtk-list] Re: Need help in GTK-project
- From: Bart Vandewoestyne <Bart Vandewoestyne skynet be>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Need help in GTK-project
- Date: Sat, 11 Dec 1999 18:22:11 +0100
Rob Huffstedtler wrote:
>
> You really ought not to be having a lot of global variables lying around
> anyway. That's poor practice in and of itself. You are begging for
> namespace collisions.
Isn't it a good solution to make the portstatus variabele global so I
can set it with the callbackfuncions such as set_left_step() etc.. ?
> Much nicer to provide functions to access your
> data (and use some sensible naming convention). Then you can use ctags
euh... maybe stupid question, but what are 'ctags'?
> to jump right to the function,
Are you suggestig here to make the portstatus variabele non-global and
try to set it using pointers?
> you don't have to worry about stomping on
> other variables, and you can completely change the implementation as
> long as you leave the interface the same.
Can't I make the portstatus variabele local in the main() program and
use some kind of setter functions to set its value, without the use of
pointers ?
Greetzzz
MC303
PS: program is on http://hello.to/MC303 --> 'Stepper Motor'
--
Bart Vandewoestyne http://hello.to/MC303
Hugo Verrieststraat 48 Bart.Vandewoestyne@skynet.be
8550 ZWEVEGEM ICQ# 21275340
BELGIUM - EUROPE nick: MC303
Phone: +32(0)56/75.48.11
-------------------------------------------------------------------
If carpenters made buildings the way programmers make programs, the
first woodpecker to come along would destroy all of civilization.
- Weinberg's Second Law -
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]