You are here: PSPad forum > English discussion forum > Powershell string continuation

Powershell string continuation

#1 Powershell string continuation

Posted by: clanman | Date: 2019-09-08 11:56 | IP: IP Logged

In Powershell you can have the following code:

$StraightAddr = 'Google LLC|1600 Amphitheatre Parkway|Mountain View, CA 94043|USA'

You can also have the same address in a string put together like this:

$FormattedAddr = 'Google LLC
1600 Amphitheatre Parkway
Mountain View, CA 94043
USA'

In the case of $FormattedAddr PSPad does not highlight

1600 Amphitheatre Parkway
Mountain View, CA 94043
USA

as a string. In fact it starts a new string after the "'" at the end of USA.

I know one could argue this is bad programming however since this is valid in the language is it possible for PSPad to recognise it for strings starting and ending with '' and "" that span multiple lines?

Options: Reply | Quote | Up ^


#2 Re: Powershell string continuation

Posted by: pspad | Date: 2019-09-08 12:25 | IP: IP Logged

Thank you for info. I have to add support for multiline strings

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR