• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

R U getting a feel for the nitpicks ?

 
Stuart Goss
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Johannes and all.
Well I sent off my 3rd attempt of Say4b and slipped a global variable in so that I could do nice things with it without wondering about if it was only copied an d so forth. I no, I shouldn't have, but if I can remeber rightly it had been a long day at work and I just didn't think.
Sorry Marilyn. Marilyn nitpicked me with this
You're trying to use a global variable - which is taboo in OO techniques. Well, in procedural techniques too! I don't think you need this. Instead, you should be passing this into methods if you need it.

I am sooo ashamed of my self. I was even passing it in to the method, although it was a global variable.
The lesson is: Don't use GLOBAL VARIABLES
Bye, Stuart.
P.S. I am getting the feeling for the nitpicks maybe, because as soon as I sent that attempt for Say4b off, I knew I was going to be slapped.

 
Johannes de Jong
tumbleweed
Bartender
Posts: 5089
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If Marilyn saw the PL/1 programs of myself & the +-500 other programmers here, she will get a fit.
We go GLOBAL
 
Michael Pearson
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If every variable has global scope than it's like all the variables are local.
"Go global or go home" - could be the motto for some people I know.
Michael
 
Johannes de Jong
tumbleweed
Bartender
Posts: 5089
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like it Micheal !!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic