Quote:
Originally Posted by danielkza
AMXX string functions were specially crafted to avoid the need to convert cells to chars. Doesn't converting cells to chars just to have them convert back to cells seem kinda pointless?
|
I know what you're getting at but packed strings can conserve memory if done correctly. You can create a single global unpacked array for a universal unpacking buffer.
It is also beneficial for having an array of bools if you choose not to use bit-fields.
PHP Code:
new g_UnpackBuffer[1024];
public Func1()
{
new szPacked1[100 char];
strunpack( szPacked1 , g_UnpackBuffer );
}
public Func2()
{
new szPacked2[512 char];
strunpack( szPacked2 , g_UnpackBuffer );
}
__________________