For the sake of consistency between languages, I want to utilise ‘;’ as what sepratates statements. ‘If Powershell command separator is ; (semicolon), why does "date; dir" make dir output extra details? - Super User’ demonstrates that this is able to be problematic, but ‘If Powershell command separator is ; (semicolon), why does "date; dir" make dir output extra details? - Super User’ provides remediation.
Although addition of this is spacially wasteful, addition is able to allow my 1st desire, and provide knowledge of how PowerShell operates. However, I am worried that this is able to cause additional problemacy that I did not forsee, similarly to ‘1383533/904401’.
Is anybody able to confirm that what I desire is not obviously problematic?
Welcome to the forum.
Do you try to solve a particular problem with using a semikolon? In 99.99% of the times it is unnecessary.
According to the well known bast practices and style guides it is not recommended. The same is valid for using aliasses like
dir in scripts.
And what’s the problem with
‘1383533/904401’was my sole method of reference to ‘If Powershell command separator is ; (semicolon), why does "date; dir" make dir output extra details? - Super User’ because this configuration of Discourse prevented addition by me of more than 2 links within that post.
My desire for addition of the semicolon is not for resolution of any problemacy. My desire for addition is merely so that I am able to allow my code to be more consistent with alternative langages that are similar to C, C++, and Python, and because manual addition of what is usually automatic provides knowledge of how PowerShell operates.
Hmmm … I’m sorry, that does not make any sense for me at all. Why would you like to look one programming or scripting language look like a completely different language? IMHO that does not serve any purpose. It would even make the language harder to read because this code would look different to other code of the same language.