PDA

View Full Version : Still: static udt-subelements...



ReneMiner
30-09-2018, 09:31
I could not find any news yet about instantly assigning value to static udt-subelements yet.
But I still wish for it...

Imagine, simple example:


Type tVec2D
Static sType As String Value "Double"
Static Points As Long Value 2
X As Double
Y As Double
End Type


sType will contain "Double" for every item dimensioned as tVec2D.
(It's just an example, OK?)
The value of Points for every item dimensioned as tVec2D will be 2. It says a tVec2D persists of 2 points...

Now:


Type tVec3D Extends tVec2D
Static Points As Long Value 3
Z As Double
End Type


Yes, that's a bit tricky.
In this case the "Points" should hold a different value than the Type that is Extends'ed. But the other static value that says "Double" should be available too. It has not been assigned explicitly on type-declaration, so it has to be inherited from tVec2D with same value.

Could this be realized?

ErosOlmi
02-10-2018, 14:11
Ciao René.

I'm working also on it.
At least for the basics.

Static Numerics seems OK.
Strings (both fixed or dynamic) are a little bit more complex.

Ciao
Eros

Petr Schreiber
05-10-2018, 14:17
Hi Eros,

this will be handy, I will be glad to update the UDT docs then :)


P

ErosOlmi
05-10-2018, 17:02
Numeric and dynamic strings are done.

I'm working on:

fixed strings
Extended UDT transferring default static values from base UDT

ReneMiner
05-10-2018, 19:08
I will need a computer soon!
:D