While numeric members of UDT are handled correctly in With/End With, STRING/ASCIIZ based ones seem to have problem.
The issue seems to be related to recently introduced checking for double concatenation.
The reason seems to be fact, that ThinBASIC supports the following symbols for string concatenation:
Dim s1, s2, s3 As String
s1 = "Hi" + ", how is it going?" ' -- Valid syntax
s2 = "Hi" & ", how is it going?" ' -- Valid syntax
s3 = "Hi" . ", how is it going?" ' -- Valid syntax
And here is code demonstrating the issue:
Type Record
sName As String
sSurName As String
sCompleteName As String
End Type
Dim human As Record
' -- This is OK
human.sName = "John"
human.sSurName = "Carmack"
human.sCompleteName = human.sName + human.sSurName
' -- This does not work
With human
.sName = "John"
.sSurName = "Carmack"
.sCompleteName = .sName + .sSurName
End With
The problem is the parser found + and ., and it false positively expects these to be two concatenation operators. That would be true in other case, but not inside With/End With.
I think the usage of dot as concatenation operator might cause even more trouble, because it was introduced before UDTs were supported in ThinBASIC and it clashes with the dotted syntax a bit.
Petr