U8 (Unsigned 8-bit Integer)¶
The U8 type represents an unsigned 8-bit integer in raypy. It can store values from 0 to 255.
U8can only store values from 0 to 255 (inclusive)- Negative and greater than 255 values will raise a
ValueError
Type Information¶
| Type | Rayforce Object Type Code | Range |
|---|---|---|
U8 |
-2 |
0-255 |
Creating U8 Values¶
Accessing Values¶
Binary and Hexadecimal¶
# Working with different number bases
>>> t.U8(0b11111111) # Binary
U8(255)
>>> t.U8(0o377) # Octal
U8(255)
>>> t.U8(0xFF) # Hexadecimal
U8(255)