07-05-2025, 01:20 AM
@Herve
welcome
it is an interesting glitch of parser
![[Image: Rules-for-naming-variables-in-Qbasic.png]](https://i.ibb.co/ymNFPdBv/Rules-for-naming-variables-in-Qbasic.png)
![[Image: Rules-of-DOT-in-naming-an-UDT-variables-by-TYPES.png]](https://i.ibb.co/dsMB8RRY/Rules-of-DOT-in-naming-an-UDT-variables-by-TYPES.png)
![[Image: Rules-ofnamingvariables-by-DIM.png]](https://i.ibb.co/39VtR3nd/Rules-ofnamingvariables-by-DIM.png)
welcome
it is an interesting glitch of parser
![[Image: Rules-for-naming-variables-in-Qbasic.png]](https://i.ibb.co/ymNFPdBv/Rules-for-naming-variables-in-Qbasic.png)
![[Image: Rules-of-DOT-in-naming-an-UDT-variables-by-TYPES.png]](https://i.ibb.co/dsMB8RRY/Rules-of-DOT-in-naming-an-UDT-variables-by-TYPES.png)
![[Image: Rules-ofnamingvariables-by-DIM.png]](https://i.ibb.co/39VtR3nd/Rules-ofnamingvariables-by-DIM.png)
Code: (Select All)
Option _Explicit
Type SomeType
i As Integer
s As String
d As Double
End Type
Type OtherType
element As SomeType
End Type
Dim S.t.Q As String
Dim Shared S.t.S As Single
Dim Shared glop.w As OtherType 'glop.element has been changed into glop.w to avoid misunderstandment
S.t.Q = "Mio"
' it is legal to use DOT "." in the name of variable, so how can the Parser distinguish between an UDT and a simple variable?
S.t.S = 1.0
glop.w.element.i = 0
glop.w.element.d = 5.726E45
glop.w.element.s = "Home"
End
In Lubuntu and QB64pe 4.1.

