Variable Size
I saw a post in here the other day that asked about the following:
variable[32] get_user_name(id, variable, 31) Why is it that the size is 32, but the maximum number of characters is 31? Can't they be the same number? I don't think that question was properly answered, so if someone could tell me why, it would be greatly appreciated. |
It's always the variable's length minus one.
|
I'm not sure but I belive that the last byte is 0 that marks the end of string ...
|
cos 32 is the TOTAL amount of spaces, yet counting starts at 0, so you only go up to 31 ;P
|
Quote:
|
Quote:
|
so is my understanding of it, i may be wrong :oops:
::edit:: score -1 for me :p |
Quote:
|
| All times are GMT -4. The time now is 16:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.