Double equals sign

I have learned to use the « and » key combinations from using them so often. The others, I use the built-in Keyboard Viewer, although Apple in its wisdom has made that obscure to turn on.

I use the ¶ and ¬ symbols only to make text easier to understand. I prefer to type in one symbol instead of four or five.

I wish there would be application specific text replacement. Does anyone know of anything that does that? Maybe I could put in a request to Apple.

Bruce, I feel. your pain with respect to typing multiple characters for a “one action” event. Here’s an idea … In your Initialize procedure, you can define your own constants for those that use muti-stroke characters.
For example:

FileGlobal TAB, CR, TRUE, FALSE
TAB = Chr(9)
CR = Chr(13)
TRUE = -1
FALSE = 0

You have all your definitions in one place and you can type your code (All Caps is optional of course) without having to use the shift key.

When you have a nested this or that, it can minimize the number of parentheses you have to keep track of.

When I’m reading back through my code after being months away from it. Words like TAB are easier to digest than Chr(9). Though there is a single character, option l, for tab (and another for carriage return), Jim has suggested, in the long run, using the ASCII code might result in more compatibility.

Did I mention having those definitions all in one place is a GOOD thing. One of the biggest challenges when working with someone else’s code - or my own after a period of time (these days measured in weeks), and made worse by OOP features, is the “… where the heck did that come from … ?” introduction of a variable or action the was originated deep within some obscure object.

For example, though you can put procedures in objects, I prefer to put procedures in procedures and just call those procedures from objects. It’s an old-timey perspective, for sure. But dag nabbit, it works.

Triggers for Keyboard Maestro can be application specific. You should be able to set up text replacements with that.

I don’t think he suggested that. I think he suggested using the custom functions

tab(), cr(), lf(), true(), false() instead of ¬, ¶, chr(10), -1, 0 respectively. They should be as easy to read as the variables you suggest, and they aren’t case sensitive. You can make them all caps if you like, but you don’t have to.

Dave, to each his/ her/non-binary own. In code I don’t like to use parentheses unless absolutely necessary; I sometimes have a hard enough time matching required parentheses in complex statements.

It’s easier for me to read “true” and “false” though I do understand “0” and “-1”.

I think you may have missed true() and false(). I agree that you shouldn’t use 0 and -1. Not that it will ever stop working - it’s just much easier to read.

Which brings up an important point – most professional programmers agree that making code easier to read is much more important than making it easier to write. You’ll only write code once, but you may read it many times, and others may need to read it in the future also. So for example, I think using tab() is much clearer than using ¬. It’s a couple more keystrokes, but I think those keystrokes are well worth it. (And actually I think it’s easier to type, for characters like ¬ I have to move my fingers from the home position and look for the option key, for tab() I can touch type that easily. If you’re not a touch typist that may not be a factor for you.)

I don’t have any problem with (), it’s so easy with the two keys right next to each other, and there’s no chance of a mismatch with them right next to each other. But if you don’t like doing that, that’s a perfectly valid opinion for you.

Dave is correct, I didn’t mean to suggest that. I just think that it is more readable, as I explained above.

Yes, that is a fantastic feature. For example, I have Keyboard Maestro set up so that in Panorama typing in zzll automatically types zlog labelize(), and it even puts the insertion point between the parenthesese. Saves tons of time.

I’ve actually been in this situation, and because I didn’t know exactly the name of the operation whose name is abbreviated to <==, the best place i could think to look was with the rest of the non-alphabetic items in the help file. Also, this:

Neither <== nor == in the search box lead to hits in the help system.

cw

Actually, if you check off the Full Text Search, they do come up

Screenshot 2024-02-09 at 8.51.17 AM

The search for == produces this.

I’m sure i tried that, but it would have been in the old help system. But I’ve been wrong before. And it doesn’t show up - it just shows the text name for the operator-like symbol. I had never seen the term ‘assignfieldwithsedeeffects’, so i didn’t immediately recognize it. I did figure it out, eventually, but “==” really ought to be listed in the hits.

Either way, though, i don’t think it’s unreasonable to keep some info in a few places if it helps people find it.

Shouldn’t “Full text search” also search for the item being searched for? As in, it should be a superset of the regular search?

It should, and it is.

To make that happen, there would have to be a topic page named ==. Perhaps there should be, but there isn’t. And there never has been. In fact, in Panorama 6, even a full text search for == turns up nothing.

CleanShot 2024-02-22 at 14.48.51@2x

(It says “1 visible” but that’s a bug, there are no topics listed.)

Actually, in Panorama X there definitely shouldn’t be a help page for ==, because == isn’t a thing in Panorama X.