RDNWiki: DOWScar/Functions/Number ...

RDN Wiki Home | Page Index | Recent Changes | Recently Commented | Users | Registration | Login:  Password:  

Number Data Type


Contents


Number data type is used in one function in SCAR, Number Util_GetTrailingNumber?.


Basically, it is to say that the return value of a function will be appropriately Real or Integer as appropriate – whatever LUA interpretes it as.


Real and Integer are of the Number data type, although they do mean different things. See the LUA Tutorial on the subject for more information.


Numbers can have arthemetic operations used on them, such as +, -, / (divide), and * (multiply). The precedence of these operations if done more then one at a time is:



Brackets can be used to force sections to be of higher precedence – like any normal algebra.


There are also mathematic functions such as sin, cos, tan, abs and so on avalible to use. Use the functions under “math.” to use them (such as «math.sqrt(5)"). See The LUA Math Libary Tutorial for full documentation of all the math functions built into LUA.


See Util_GetTrailingNumber? for examples.

Links


Data Types
Functions
SCAR Home
Wiki Home

End of Page

There are no files on this page. [Display files/form]
There is no comment on this page. [Display comments/form]