sizeof
#4

Also it's good to know that sizeof is a compiler directive, so it's not a function (unlike strlen for example). That implies you cannot use it on arrays with a size that's not known at compile-time (function arguments mostly).
That's why functions which write into arrays also need the size of the array passed seperately (like format).

It can be used on any variable as well, it doesn't neccessarily have to be an array (however there's almost no use-case except arrays, as all variables in PAWN are cells).
Reply


Messages In This Thread
sizeof - by wallen - 06.03.2018, 14:58
Re: sizeof - by Sew_Sumi - 06.03.2018, 16:18
Re: sizeof - by wallen - 06.03.2018, 16:24
Re: sizeof - by NaS - 06.03.2018, 18:35

Forum Jump:


Users browsing this thread: 1 Guest(s)