Arrays with N Dimensions
2 Attachment(s)
Introduction
Creation Deletion Getting Setting Filling Invalid NDim Arrays Example Sponsors Introduction [top] While coding in Pawn we like to use arrays. Code:
new First[10]; Pawn limits scripters to only three dimensions and makes it hard to accomplish using more. The method to be discussed makes it easier on scripters. N Dimensional (NDim for short) Arrays use two cell arrays to accomplish an infinite amount of dimensions. NDim arrays are used much like cell arrays. (Most of the documentation is the same) Code:
/** Creation [top] Code:
/** Deletion [top] Code:
/** Getting [top] Code:
/** Setting [top] Code:
/** Filling [top] (Remember that NDim Arrays start zeroed) Code:
/** Invalid NDim Array [top] Obviously you cannot create an NDim Array with negative sizes. If you do for some reason you will be returned: Code:
Invalid_NDim Example [top] Code:
//1st Dimension ranges from 0-32 Sponsors [top] This Code Snippet brought to you by the letter: E |
Re: Arrays with N Dimensions
Good work. You should provide an example.
|
Re: Arrays with N Dimensions
nice!
|
Re: Arrays with N Dimensions
Quote:
Anyway good job Emp`:up: |
Re: Arrays with N Dimensions
Nice work :D
|
Re: Arrays with N Dimensions
Here is a simple example:
PHP Code:
PHP Code:
PHP Code:
|
Re: Arrays with N Dimensions
Thanks for this!
|
Re: Arrays with N Dimensions
You should include the natives you use.
|
Re: Arrays with N Dimensions
Quote:
Code:
#include <cellarray> |
Re: Arrays with N Dimensions
Quote:
|
All times are GMT -4. The time now is 11:44. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.