This article's documentation is for anything that uses the Source engine. Click here for more information.

Byte: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Also in goldsus; cbasedoor is where I found it)
Line 5: Line 5:
A byte is the minimum amount of memory allocatable. Even a [[bool]] is one byte (thus the benefits of [[BitVec]]).
A byte is the minimum amount of memory allocatable. Even a [[bool]] is one byte (thus the benefits of [[BitVec]]).


* In [[Source]],{{clarify}} <code>byte</code> is a typedef for <code>unsigned char</code>.
* In [[GoldSrc]] and [[Source]], <code>byte</code> is a typedef for <code>unsigned char</code>, making its range 0-255.


[[Category:Variables]]
[[Category:Variables]]
[[Category:Source]]
[[Category:Source]]

Revision as of 09:10, 5 March 2025

English (en)Deutsch (de)中文 (zh)Translate (Translate)

A byte is eight bits, the size of one char. A kilobyte (KB) is 1024 bytes, while a megabyte (MB) is 1024 kilobytes, a gigabyte (GB) is 1024 megabytes, etc.

A byte is the minimum amount of memory allocatable. Even a bool is one byte (thus the benefits of BitVec).

  • In GoldSrc and Source, byte is a typedef for unsigned char, making its range 0-255.