Raised This Month: $ Target: $400
 0% 

New API and Syntax


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
BAILOPAN
Join Date: Jan 2004
Old 07-13-2014 , 16:46   Re: New API and Syntax
Reply With Quote #11

Quote:
Originally Posted by Arkarr View Post
Why 'char' instend of String ?
The reason is alluded to in the post, but it's worth clarifying. In normal type systems, the concept of a "string" is a data type in and of itself. For example:

PHP Code:
string x "hello!"
In Pawn, it is:
PHP Code:
String:x[] = "hello1"
Here, "String" is really a storage modifier affecting how the array is allocated. It's not actually a string - it's just telling the array that it's an array of characters. It looks like a string, but it's a hack. Long-term we want to provide a true string type. It's important that we begin to eliminate the concept of String: ahead of time, to eliminate any confusion. char may be unfamiliar but it's much more true to what's actually going on.

I myself look forward to a point in time when we have API calls like this:
PHP Code:
native string GetClientName(int client); 
__________________
egg

Last edited by BAILOPAN; 07-13-2014 at 16:58.
BAILOPAN is offline
 



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 07:53.


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