> Problems with standards: one man's meat is another man's poison Agreed, that's why I tossed this out to the group. It needs to simmer for a few days. > What is descriptive to some might not be for others. In some cases, yes. But IN5 v StopButton? While I'm picking on things, even the name LOADALLDACS is more technical than it need be. The high level function of this routine is to update the output CVs with the values in the output variables, so it's a "WriteAllOutputs" routine. Since there are also routines that update only one DAC, these could be called WriteOutput1 thru WriteOutput4, and thus LOADALLDACS might be named WriteOutputsAll (cumbersome) or even WriteOutputs1to4 (in case a future PSIM has, say, a WriteOutputs1to8 routine, you know?). Maybe the word "Write" is also too technical, and I should say "Send," but I think that Read and Write are more descriptive than SCAN and LOAD. (What's the opposite of Send? Receive? No thanks. Read & Write seem better to me. But it's quite subjective, I know!) > ALL CAPS is historical I think (MBASIC anyone? Further back?) And of minor importance, since the compiler doesn't care. ALL CAPS ARE FINE. ;-) For what it's worth, all caps goes back decades. Computers used nothing but caps for many years before they could handle lowercase. > Since I agree with the basic premise, I've coded my stuff to conform > to what came before me (my consultant background showing). That way, > it's at least uniform. For sure, we should try to conform to the same standards. I wasn't picking on anyone's code. > One thing I do strongly agree with is the labelling of global > variables. However, in this language EVERY variable is global :( > What I've done is to indicate where a variable is tweaked elsewhere > (as in a GOSUB) within the comments. I know. All variables are global, but some are more global than others. (Ha ha, I'm paraphrasing a famous quote there.) So, the word "global" is not the best way to describe the common variables, but... Hey! How about "c" for "common"? I'm just trying to distinguish between what I'll call "user variables" and the common, do-not-touch-because-they-belong-to-the-subroutines vars. Time for me to be quiet so others can weigh in. -- john
Message
Re: [SynthModules] Re: variable naming (or, much ado about nothing?)
2004-05-13 by john mahoney
Attachments
- No local attachments were found for this message.