Похожие чаты

Hello pls what does uint16_t mean ?

13 ответов

10 просмотров

Unsigned integer 16 bit so you have the range of 0 to 2^15

carlos- Автор вопроса
Alexander
Unsigned integer 16 bit so you have the range of 0...

But what will make anyone declare a variable with such a huge capacity or are they just trying to follow good prog practices

carlos- Автор вопроса
carlos
But what will make anyone declare a variable with ...

Won't int serve close to the same purpose

carlos
Won't int serve close to the same purpose

Int is 2^32 on older machines and 2^64 on modern systems

carlos- Автор вопроса
Avihay B
It's capacity is 16 bits or 2 bytes

Okay...all I'm just confused is that some people declare variable with not definite/ absurd data type....looks at volatile int for example 🤧🤕

carlos- Автор вопроса
carlos
Okay...all I'm just confused is that some people d...

Once upon a time, C had the keywords int, short and long. int was declared as an integer as the native word size of the architecture you are compiling to. And everyone lived in peace... Until you started putting code to different architectures, and was short int 8bit? Or 16bit? yes here and not there, and then everybody tried to kill everyone else because their size was right and the others were wrong! But tiered of the fighting, everyone started using type names with explicit bit count. And it was good enough, and in, I think, 1999, the 98 c standard peace treaty was signed, and there was peace

carlos
Okay...all I'm just confused is that some people d...

Volatile means that the value might change by some external factor ( like a different thread, or by some special register handling, and that the compiler shouldn't make assumptions about the value for optimization purposes

carlos
Won't int serve close to the same purpose

No int is different. The highest number in a signed integer is different. Unsigned integers are mostly used to describe registers with the same width. Signed integers habe one bit that serves as minus sign, so it is different in its structure.

Alexander
No int is different. The highest number in a signe...

It should also be noted that "int" is a platform dependent type. I.e. on one system it may occupy 16 bits, and on another it may occupy 32 bits. Whereas *int*_t declare a type of exactly X bits long.

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

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта