Похожие чаты

Do you know why this piece of code would trigger

panic error?

3 ответов

7 просмотров

No

AngryMethane- Автор вопроса
Liλn 🌻
No

For signed integers, the most significant bit is the signed bit. While unsigned integers doesn't have the signed bit. So for unsigned integers, -1 means 255, cause the binary format of -1 is 11111111 https://en.wikipedia.org/wiki/Bit_numbering

AngryMethane
For signed integers, the most significant bit is t...

I knew that but: - you’re comparing against larger than or equal to 0 - this is not a bug, it’s a design principle - string lengths don’t have negative values

Похожие вопросы

Карта сайта