MC Press Online Forum
Welcome, Guest
Please Login or Register.    Lost Password?
TechTip: Overloading Indicators (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: TechTip: Overloading Indicators
#119570
Guest.Visitor (Visitor)

Birthdate:
TechTip: Overloading Indicators 3 Years ago  
Reducing the number of variables, in this case, indicator variables, in a program is not necessarily a benefit in itself. Reducing the number of variables can make a program more readable, but this is not true in every case. <p>I don't refer to numeric indicators in my programs, I prefer to use named boolean variables that map to indicators in the display file because it makes the program easier to understand. In your example, the boolean variable actually serves 2 purposes, so naming these variables so that it is clear what their purpose is becomes more of a challenge. I think trying to get as much functionality as possible out of each variable as you are doing in your examples does not improve program readability and one could make the argument it reduces readability to some degree. <p>Jim Suiter
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119569
MC Press Web Site Staff (Admin)
Admin
Posts: 1061
graphgraph
User Offline Click here to see the profile of this user
TechTip: Overloading Indicators 3 Years ago Karma: 1  
This is a discussion about <B>TechTip: Overloading Indicators</b>.<p align='center'><a href=http://www.mcpressonline.com/mc? This e-mail address is being protected from spam bots, you need JavaScript enabled to view it @.6b328bf5>Click here for the article</a>.</p>
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#119571
Guest.Visitor (Visitor)

Birthdate:
TechTip: Overloading Indicators 3 Years ago  
I believe that indicators have been given a bad rap. Indicators are easy to use. I do not see the value in re-using the same indicator for different functions. <BR>
In my subfile programs, I always use 40 to clear and 41 to display the control and 42 to display the detail (if there is any--a lot of my programs will not have detail). By adhering to this standard, my programs are easy to follow and easy to change. <BR>
&nbsp;I do not turn on an idicator or fill a field because of a situation (unless it is to display a screen atribute) in my programs. I use the actual situation to cause code to be executed. <BR>
&nbsp;Indicators are our friends. <BR>
&nbsp;Yes, indicators can be over-used; but so can anything else.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
   MC-STORE.COM