Difference between revisions of "ObjectType:byte"
Jump to navigation
Jump to search
Line 16: | Line 16: | ||
== Examples == | == Examples == | ||
− | declare Age byte "128" | + | ===Declare a byte variable=== |
+ | *declare Age byte "128" | ||
+ | ===Increment a byte variable=== | ||
+ | *Age:Inc | ||
+ | ===Decrement a byte variable=== | ||
+ | *Age:Dec | ||
+ | ===Set a byte variable to a given value=== | ||
+ | *Age:Set[30] | ||
+ | ===Add two byte variables=== | ||
+ | *TotalAge:Set[${Age1}+${Age2}] | ||
+ | *Cookies:Inc[${NewCookies}] | ||
+ | |||
== See Also == | == See Also == |
Revision as of 23:06, 26 August 2005
Contents
Description
Similar to an int, a byte is a whole number. The range of a byte is 0-255.
Members
(none)
Methods
- Inc: Increments this byte by 1
- Inc[formula]: Increments this byte by a given amount
- Dec: Decrements this bye by 1
- Dec[formula]: Decrements this byte by a given amount
- Set[formula]: Sets this bye to a given value
Returns
The string representation of this number
Examples
Declare a byte variable
- declare Age byte "128"
Increment a byte variable
- Age:Inc
Decrement a byte variable
- Age:Dec
Set a byte variable to a given value
- Age:Set[30]
Add two byte variables
- TotalAge:Set[${Age1}+${Age2}]
- Cookies:Inc[${NewCookies}]