![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Help me please |
Can anyone tell why do we use int here
export (int) var speed = 200
Is there any benifit of writing (int)
after export
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Help me please |
Can anyone tell why do we use int here
export (int) var speed = 200
Is there any benifit of writing (int)
after export
![]() |
Reply From: | timothybrentwood |
int
tells the editor to only let you enter integer numbers (or whole numbers) into the editor box for the variable speed
, disallowing you from entering in float
s e.g. 200.5 or string
s e.g. “fast”.
![]() |
Reply From: | Help me please |
Thank you!
Its somewhat same as c++
int = integer
bool = boolen
float = floating values
etc.