SA-MP Forums Archive
The limitation which PAWN has issued on arrays. Did you know? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: General (https://sampforum.blast.hk/forumdisplay.php?fid=13)
+--- Thread: The limitation which PAWN has issued on arrays. Did you know? (/showthread.php?tid=491625)



The limitation which PAWN has issued on arrays. Did you know? - ACI - 31.01.2014

I just today discovered that one of the PAWN's limitations is that an array cant have more than 3 dimensions, but still the compiler doesn't complain. I have still not tested this, but I saw this when I was reading the source code:

pawn Код:
#define sDIMEN_MAX    3     /* maximum number of array dimensions */



Re: The limitation which PAWN has issued on arrays. Did you know? - Konstantinos - 31.01.2014

It should give error 53: exceeding maximum number of dimensions.


Re: The limitation which PAWN has issued on arrays. Did you know? - ACI - 31.01.2014

But what about:

pawn Код:
#define sDIMEN_MAX    3     /* maximum number of array dimensions */



Re: The limitation which PAWN has issued on arrays. Did you know? - Konstantinos - 31.01.2014

What about it? It's just a definition, as long as you don't declare an array with more than 3 dimensions, you will not get the error.


Re: The limitation which PAWN has issued on arrays. Did you know? - Mauzen - 31.01.2014

There are very few things that need more than 3 dimensions anyways, you can still work around that with using indexes then.


Re: The limitation which PAWN has issued on arrays. Did you know? - ACI - 31.01.2014

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
What about it? It's just a definition, as long as you don't declare an array with more than 3 dimensions, you will not get the error.
Ah! I was going through the error list of pawn-lang.pdf and the reason for that error is that the current implantation of PAWN compiler only supports arrays with one or two dimensions, not three!