Code: Select all
dim as integer X1 = 2
const as integer X2 = 2
dim as const integer X3 = 3
type abType
dim as short a, b
end type
dim as abType AB1 = type(1, 1)
const as abType AB2 = type(1, 1) '<-- Not allowed
dim as const abType AB3 = type(1, 1)
union baUnion
dim as long ba
type
dim as short b,a
end type
end union
dim as baUnion BAU1
const as abUnion ABU2 '<-- Not allowed
dim as const baUnion BAU3 = 1 '<-- Not ok, how to set?
union abUnion
type
dim as short a, b
end type
dim as long ab
end union
dim as abUnion ABU1
dim as const abUnion ABU3 = type(1, 1) '<-- OK
print ABU3.ab