Trivial parsing issue with Gui , Add

Report problems with documented functionality
pneumatic
Posts: 230
Joined: 05 Dec 2016, 01:51

Trivial parsing issue with Gui , Add

13 Aug 2019, 04:36

Code: Select all

#SingleInstance , Force
				  
;Works				  
Gui , Add , Text , % "x" . (2+2) 
				  . " y4 w35 h15" , Text

;Doesn't work				  
Gui , Add , Text , % "x" . (2+2) 
				  . " y24 w35 h15" , Text:
				  
;Works
Gui , Add , Text , % "x" . (2+2) 
				  . " y44 w35 h15" , % "Text:"
				  
		  
Gui , Show , w250 h65 Center , Gui
return

GuiClose:
ExitApp
return

Image
lexikos
Posts: 6483
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Trivial parsing issue with Gui , Add

17 Aug 2019, 03:35

The issue is with parsing of continuation lines that end with a colon and do not begin with a comma.

Code: Select all

MsgBox 0, % ""
  . "Title", Ends with a colon:
This seems to be intended, although based on a false premise:
// With the exception of lines starting with a comma, the last character of any
// legitimate continuation line can't be a colon because expressions can't end
// in a colon. The only exception is the ternary operator's colon, but that is
// very rare because it requires the line after it also be a continuation line
// or section, which is unusual to say the least -- so much so that it might be
// too obscure to even document as a known limitation. Anyway, by excluding lines
// that end with a colon from consideration ambiguity with normal labels
// and non-single-line hotkeys and hotstrings is eliminated.
Another workaround is to move , Text: to the next line.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 2 guests