Why do we use int

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: 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

:bust_in_silhouette: 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 floats e.g. 200.5 or strings e.g. “fast”.

:bust_in_silhouette: Reply From: Help me please

Thank you!
Its somewhat same as c++
int = integer
bool = boolen
float = floating values