Two minor str questions.
#1

1st question: Why do people use -1 in the pos offset of strfind? shouldn't it be 0? to start searching for the word from the first letter of the string? Please explain.

2nd question: I saw this code example of strval in Wiki:
pawn Код:
new string[4] = "250";
new iValue = strval(string); // iValue is now '250'
I don't understand whats the use of it when you can just do:
pawn Код:
iValue = string;
Please explain.

-Thankyou.
Reply


Messages In This Thread
Two minor str questions. - by ||123|| - 18.07.2011, 12:26
Re: Two minor str questions. - by Mauzen - 18.07.2011, 12:32
Re: Two minor str questions. - by [HiC]TheKiller - 18.07.2011, 12:34
Re: Two minor str questions. - by ||123|| - 18.07.2011, 12:36

Forum Jump:


Users browsing this thread: 1 Guest(s)