This is the first of an open-ended series of short tips on using PrimalScript. If you’ve ever used the product you know there are a wealth of features. I want to devote some blog time periodically to show-off some feature you may not have been aware of or a quick tip to use the product more efficiently. If you don’t have a copy of PrimalScript, you can download a 45 day evaluation copy from PrimalScript.com.
One tip that I’ve always found useful, once I found out about it, was finding a matching brace or parenthesis. Many languages use { } or ( ) and the closing character could be many lines later in your code. You might even have nested expressions using { } and ( ). I know I’ve written some gnarly nested expressions only to get “lost” and have issues troubleshooting. Here’s where Ctrl-M comes in handy. Put your cursor at the first brace or parenthesis and type Ctrl-M. Primalscript will find the corresponding end brace or parenthesis. Now, the highlighted block of code may not be what you were expecting, but it is what the language parser thinks you want to do based on what you’ve written. I know I’ve written scripts where I’ve omitted a closing } or it is in the wrong place and using Ctrl-M identifies these problems in a snap.