0
How do i get type data? Does Anyone may clarify what these two methods mean?
Two methods: - statically at compile time -dynamically at runtime. Does Anyone may clarify what these mean?
2 Answers
+ 1
i'm sure someone else can chime in... but from what I know..and I hope I am getting this right. đ
statically at compile time means that the compiler knows what the objects methods and/or properties are already so they are handled at compile time. These objects are static.
dynamically at runtime the compiler doesn't know what kind of object it is or what properties or methods it could contain. How the object is handled is determined at run-time.
0
You get a datatype by looking at the kind of data you have
Statically
Yes/No is datatype boolean
Text is datatype string
Number is datatype integer
And there are more datatypes
Dynamically
datatype var is a dynamic datatype. The compiler determines at run-time, what type of data your data is.