Concern: global or local string variable scope?
#1

Which approach should I take in order to make my server run smoother. What I mean is, should I use only one variable throughout my code? The reason I'm asking is because I sometimes am forced to define a string variable with 256+ cells to read long file lines.

Using this:
Code:
new str[100];
public fTest(arg)
{
format(str,sizeof str,"%d", arg);
return str;
}
public fTest2(arg)
{
format(str,sizeof str,"%d", arg);
return str;
}
Instead of:
Code:
public fTest(arg)
{
new str[100];
format(str,sizeof str,"%d", arg);
return str;
}
public fTest2(arg)
{
new str[100];
format(str,sizeof str,"%d", arg);
return str;
}
... and so on
Reply


Messages In This Thread
Concern: global or local string variable scope? - by Dr.Einstein - 29.01.2014, 04:27
Re: Concern: global or local string variable scope? - by RajatPawar - 29.01.2014, 04:50
Re: Concern: global or local string variable scope? - by Dr.Einstein - 29.01.2014, 05:06

Forum Jump:


Users browsing this thread: 1 Guest(s)