Picky formatting question regarding placement of open/close braces

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
This topic is 1 year and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
PNutts
Posts: 22
Last visit: Wed Feb 28, 2024 9:11 pm
Has voted: 2 times

Picky formatting question regarding placement of open/close braces

Post by PNutts »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PrimalScript 2022 Version 8.0.169
Operating system: Windows 10
PowerShell version(s): 5.1
32-bit version of software? No

*** Please add details and screenshots as needed below.

DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM

I've scripted with Notepad++ and surprisingly liked it. It has some formatting features I like and I haven't found a way to make PrimalScript behave the same way.
  1. For if statement script blocks, I put the open brace on a new line. Notepad++ automatically indents the next line.
  2. To end the script block, I put the close brace on a new line. It's indented as expected and described in #1, and when I press enter it is automatically lined up with the matching open brace.
Thank you for any hints/tips.
User avatar
Alexander Riedel
Posts: 8473
Last visit: Tue Mar 19, 2024 1:15 am
Answers: 19
Been upvoted: 37 times

Re: Picky formatting question regarding placement of open/close braces

Post by Alexander Riedel »

PrimalScript keeps the indentation you have on the previous line. It does not add or subtract from your indentation automatically.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 1 year and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.