kopia lustrzana https://github.com/micropython/micropython
Clarify possible uses of uint
rodzic
9b313453b3
commit
0326c75322
|
@ -264,7 +264,12 @@ int() casting is very fast in viper code.
|
|||
|
||||
## The viper uint data type
|
||||
|
||||
This data type is in most aspects similar to viper `int` but the range is 0 to 2\*\*32-1, i.e. it's a unsigned 32 bit integer.
|
||||
This data type is in most aspects similar to viper `int` but the range is 0 to 2\*\*32-1, i.e. it's an unsigned 32 bit integer. Typical uses could be:
|
||||
|
||||
* As return type hint when return values could fall between the maximum `int` value and 2\*\*32-1
|
||||
* For unsigned int arithmetic, in the range 0 to 2\*\*32-1
|
||||
* For pointer arithmetic, see `ptr` data types below
|
||||
|
||||
|
||||
The uint() cast function will return the last 4 bytes of `builtins.int` as a unsigned 32 bit int.
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue