Forum

> > Trash > Changing Values in Lua
Forums overviewTrash overviewLog in to reply

English Changing Values in Lua

No replies
To the start Previous 1 Next To the start

closed moved Changing Values in Lua

Dousea
User Off Offline

Quote
Let's straight to the point with no useless chit-chat.
• What's the difference between these codes?
• Which code is more expensive in performance to run?
Code 1
1
2
number = 1.5
number = 3
Code 2
1
2
number = 1.5
number = 3.0
Surely that Lua now has int subtype (as in 5.3).

That's just for integer and floating-point numbers. But what about these kinds of changing values?
Boolean to table
1
2
variable = true
variable = {true}
String to number
1
2
variable = "1"
variable = 1
Are they expensive to run?

Admin/mod comment

Double post - trashed. /user GeoB99
To the start Previous 1 Next To the start
Log in to replyTrash overviewForums overview