Can somebody explain this to me?
Since I'm new, I was wondering what does 'sz' stands for?
I've seen some stuff like szName, szNameReceiver, szAmount, szCommand... Please can somebody explain this to me? |
Re: Can somebody explain this to me?
I don't know what sz means but we use sz to know if variable is string (for readability & not for compiling)
|
Re: Can somebody explain this to me?
Quote:
|
Re: Can somebody explain this to me?
Quote:
|
Re: Can somebody explain this to me?
Quote:
Meaning that the end of the string is denoted by a value of zero. This is why you must always size an array being used as a string with one extra element (for the zero-termination). Code:
szString[7] = "hello"Prefixing is not required but because Pawn is typeless, it is generally recommended to prefix your variable so that people, including yourself, know what you are actually using the variable for. Other often used prefixes: Code:
integer: i |
Re: Can somebody explain this to me?
To be more easily and specific, it's just a tag to use when declaring variables that will store strings (words, chars, etc).
|
Re: Can somebody explain this to me?
Quote:
Tags are: 1. bool: 2. Float: 3. Array: 4. Trie: and others. |
Re: Can somebody explain this to me?
I said "tag" to be more specific.
https://forums.alliedmods.net/showthread.php?t=308561 |
Re: Can somebody explain this to me?
'Prefix' is the good word here.
|
| All times are GMT -4. The time now is 12:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.