Page 1 of 1

How Hollywood Prints Square Brackets

Posted: Fri Aug 05, 2016 10:35 pm
by PEB
I just discovered an interesting inconsistency with how Hollywood prints square brackets.

In order to avoid the format tag error, double brackets ("[[" and "]]") are needed in the string to make the printed text appear as single brackets ("[" and "]").
*The documentation ("5.3 Strings") states that "\[" and "\]" should work; but that does not seem to work.*

This works as expected:
Print("[[Test]]")
This also works as expected:
Print("[[Test")
But this does NOT work as expected (the brackets print as double instead of single):
Print("Test]]")

Viewed in the framework of some reasonable code, this works as expected:

Code: Select all

SampleStr$="Now is the time for all [[good]] men to come to the aid of their party."
WordsTable$, count=SplitStr(SampleStr$, " ")
For x=1 To count
	NPrint(WordsTable$[x-1])
Next
But if this string is used instead...

SampleStr$="Now is the time for all [[good men]] to come to the aid of their party."

...then the problem becomes apparent.

Re: How Hollywood Prints Square Brackets

Posted: Thu Aug 11, 2016 4:00 pm
by airsoftsoftwair
Yup, that's definitely a bug. Thanks for reporting!

Re: How Hollywood Prints Square Brackets

Posted: Tue Sep 20, 2016 6:08 pm
by airsoftsoftwair
Fixed.