Do variables need a data type?
- Jasmin Boller (Deactivated)
Owned by Jasmin Boller (Deactivated)
Q
Do variables need a data type?
A
If an assignment do create a variable, the variable gets implicitly the data type based on the value that has been assigned. It is also possible that avariable is changing its data type with the next assignment.
Example code:
mystring = “Hello“ -- is of type string
mynumber = 5 -- is of type number
dynvar = 5 -- is of type number now
dynvar = “Hello“ -- is of type string now
See also...
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page:
-
Page: