Format script issue?

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION 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.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 1 year and 7 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
Lembasts
Posts: 405
Last visit: Wed Mar 20, 2024 1:40 pm
Has voted: 1 time
Been upvoted: 1 time

Re: Format script issue?

Post by Lembasts »

As I mentioned, I am not allowed to upload scripts.
You mentioned "If a line in a script is parsed incorrectly" - isnt that the fault of the format script routine?
You also mentioned "Strings are not generally formatted" - which means in some circumstances they are. Are you able to indicate the criteria where strings are formatted please?
Even with the script it may be hard to reproduce the error as I mentioned I had a habit of hitting 'Format script' before every save and that has been done with multiple versions.
I dont think we can get any further with this. I just have to live with the fact that I will never hit the 'format script' button again as I have no confidence in it.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 20
Been upvoted: 37 times

Re: Format script issue?

Post by Alexander Riedel »

You may think of a script as a collection of lines, but in reality it is a stream of tokens as far as a parser is concerned.
Plenty of constructs in PowerShell (and other languages) span multiple lines. So as Brittney was pointing out, it is possible, however remotely, that an earlier expression was parsed incorrectly and threw off the formatting parser.
From your description we do not know when it happened, how it happened, or even if it was us. I understand that you assume it was the format script routine because you never change that particular part intentionally. But as I have been writing code for many years, I can tell you that I fat fingered plenty of things and if I had a nickel for everything that broke because I "never even touched that", I would be long retired :-) Just ask our QA department.
So let's not nitpick on semantics. You cannot upload any script, we understand. Without any further information we have no way of knowing what may or may not have happened.
It cannot be happening very often, otherwise you would not be alone pointing this out here. Just keep an eye on it and if or when you see something like that again, just try to make the offending code into a demilitarized sample you can upload.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 1 year and 7 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.