Which is better to do? enum in memory or a variable every time?
#6

Quote:
Originally Posted by Vince
Посмотреть сообщение
Local variables are automatically discarded as soon as control leaves the function. Also a cell is actually 4 bytes; 32 bits with 8 bits per byte.

I was never a fan of those wrapper functions. People that use those tend to mindlessly scatter them around; often calling the wrapper multiple times within the same function where it would have obviously been better to get the value once. I personally tend to store the non-changing information (name, ip, computer id) globally upon connect and then I reference it from there.
nice explanation Thanks again.

Edit.

I didn't understand well this:

Quote:
Originally Posted by Vince
Посмотреть сообщение
Also a cell is actually 4 bytes; 32 bits with 8 bits per byte.
That means what if I create a variable with 256 cells, it will have 1024 bytes (because of 256 * 4 is 1024 )?

If yes, what does "32 bits with 8 bits" means?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)