10.02.2014, 20:23
pawn Код:
new Teste[0xff];
Teste[0] = EOS;
Mas daн vem a questгo, й um bom jeito de usar? Hб algum ganho ? Alguma perda?
new Teste[0xff];
Teste[0] = EOS;
new teste[255]; //e new teste[0xff] //sгo a mesma coisa...
new str[10] = "Olб Mundo";
new str[10];
str[0] = 'O';
str[1] = 'l';
str[2] = 'б';
str[3] = ' '; //
str[4] = 'M';
str[5] = 'u';
str[6] = 'n';
str[7] = 'd';
str[8] = 'o';
str[9] = '\0'; // Mais conhecido como EOS "END OF STRING" ou tйrmino da string
new str2[10];
str2[0] = '\0';
str2[1] = 'O';
str2[2] = 'l';
str2[3] = 'б';
str2[4] = ' '; //
str2[5] = 'M';
str2[6] = 'u';
str2[7] = 'n';
str2[8] = 'd';
str2[9] = 'o';
if(string[0] == '\0' || string[0] == '\1')
public OnFilterScriptInit(){
new str[10];
str[0] = 'O';
str[1] = 'l';
str[2] = 'б';
str[3] = ' '; //
str[4] = 'M';
str[5] = 'u';
str[6] = 'n';
str[7] = 'd';
str[8] = 'o';
str[9] = '\0'; // Mais conhecido como EOS "END OF STRING" ou tйrmino da string
printf("Teste1: (str1)%s Nula: %s", str, str[0] == '\0' ? ("Sim") : ("Nгo"));
// Oque acontece se
new str2[10];
str2[0] = '\0';
str2[1] = 'O';
str2[2] = 'l';
str2[3] = 'б';
str2[4] = ' '; //
str2[5] = 'M';
str2[6] = 'u';
str2[7] = 'n';
str2[8] = 'd';
str2[9] = 'o';
printf("Teste2: (str2)%s Nula: %s", str2, str2[0] == '\0' ? ("Sim") : ("Nгo"));
return true;
}