Raised This Month: $ Target: $400
 0% 

What's "sz"?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-20-2008 , 13:19   What's "sz"?
Reply With Quote #1

I was wondering what does "sz" mean? Like:
PHP Code:
register_clcmd("amx_test""cmdTest"
PHP Code:
public cmdTest(id)
{
        new 
szArg[32]
        
read_argv(1szArg31)

__________________
hleV is offline
zwfgdlc
Senior Member
Join Date: May 2006
Old 08-20-2008 , 13:26   Re: What's "sz"?
Reply With Quote #2

sz=string,i=int,f=float,v=Vector.
zwfgdlc is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-20-2008 , 13:31   Re: What's "sz"?
Reply With Quote #3

Then why it's sz and not s?
__________________
hleV is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-20-2008 , 13:39   Re: What's "sz"?
Reply With Quote #4

Moved to Scripting Help as it is a Scripting question
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-20-2008 , 13:43   Re: What's "sz"?
Reply With Quote #5

Think it means that it's a zero terminated string.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-20-2008 , 13:43   Re: What's "sz"?
Reply With Quote #6

All string are null-terminated. Since the string is terminated by zero, 'z' is used. Personaly I prefer just s_ .

See Hungrarian notation.

I don't use much this notation style. Just some to help me to see fastly the variable type.
__________________

Last edited by Arkshine; 08-20-2008 at 13:48.
Arkshine is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 08-20-2008 , 13:49   Re: What's "sz"?
Reply With Quote #7

Thanks. ^^
__________________
hleV is offline
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 08-20-2008 , 19:12   Re: What's "sz"?
Reply With Quote #8

Modern IDEs obsolete Hungarian notation. Unfortunately, no such thing exists for Pawn as far as I know. I wonder to what degree language services would allow you to use Visual Studio.

Of course, there's not a huge need for Hungarian notation given the lack of types.
__________________
No support via PM.

Last edited by Lee; 08-21-2008 at 10:38.
Lee is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode