for example
Code: Select all
Structure T1
a.b
b.b
EndStructure
Define *pointer1.string,*pointer2.long,double.d,struc.t1
*pointer1=@double.d
*pointer2=@t1
*pointer2=*pointer1
double=t1
EnableTypeCheck
Enables the check, all examples above would cause a compiler-error
DisableTypeCheck
normal actual handling
TypeChange(variable/pointer, type/structure/interface)
Tells the compiler, that he should ignore here the original type of the variable/pointer and change it here to the given type. To change the type to a pointer, just start type with a *.
Maybe "ConvertType" is a better name?
Above Example:
Code: Select all
EnableTypeCheck
Structure T1
a.b
b.b
EndStructure
Define *pointer1.string,*pointer2.long,double.d,struc.t1
*pointer1=TypeChange(@double.d,*string)
*pointer2=TypeChange(@t1,*long)
*pointer2=TypeChange(*pointer1,*long)
double=TypeChange(t1,d)
Code: Select all
EnableTypeCheck
Structure T1
a.b
EndStructure
Structure T2 extends T1
b.b
endstructure
define *pointer.t1, var.t2
*pointer=@var
Same for Interfaces.