(12-01-2022, 04:37 PM)Pete Wrote: So when it comes to subs and functions, which convention do you employ?
CALL MySub(Parameters)
or...
MySub Paramenters
Certainly the later is less typing. It also looks neater. That stated, I almost always write apps with 20 to 30 sub routines and maybe 40+ calls. For the simple reason of ease of search, I use the CALL convention. F3, type "CALL" and check match case and whole word. Easy peasy.
I have a feeling I'm going to be in the minority on this one, but let's find out.
So which convention do you prefer?
Pete
- You can CALL me Betty, and Betty when you CALL me you can CALL me Al, CALL me Al...
Not about preference over here. It is about necessity: the difference in functional vs dysfunctional.
It is about overcoming cognitive disabilities.
The short of it: yes, CALL (in uppercase) almost exclusively (because there is always the once-in-a-blue-moon exception, in which "CALL" is a distraction), along with wrapping parenthesis on parameters.
The long of it:
Imagine that absolutely everything is a shiny object grabbing at your attention. Often the most benign attempt to find/locate something is like a game of "Where's Waldo", in which you are seeing every little detail in the image except for effing Waldo.
Structure/organisation (in the extreme, which would easily be misinterpreted as OCPD) and easily/quickly identifiable "bread crumbs" and clear markers help filter out the "noise".
Although I find uppercase text impossible to read, well-placed uppercase words, and certain usages of mixed case, help immensely.
For many things, I'm kind of like the canary in the coal mine. The very thing that kills me in no time, may not kill anyone else ever. Often enough, though, the thing that kills me is ever-so-slowly but assuredly (maybe hardly perceptible, if at all) sucking the life out of some other folk.