18.03.2017, 14:15
Sorry for late reply but i found something. Its actually possible. Since pawn is type less we can make use string function strfind to check it . I made a small macro for convenience. Its actually faster than normal looping.But there is a disadvantage if we have an element value equal to 0 the checking stops on that index and further index would not be checked and will return -1.I will try to find a method to overcome this.
now there is another way for checking without looping which is recursion but i think normal looping is better than that.
PHP код:
#define arrfind(%0,%1) strfind(%0,{%1},false,0)
main()
{
new array[]={6,2,3,3,2340,78};
printf( "index = %d" , arrfind(array,3));//will print 2
}