#if defined _ndim_array_included #endinput #endif #define _ndim_array_included #include enum NDim { Invalid_NDim = 0, } /** * These arrays are intended to be used for a form of global storage without * limiting how many dimensions a person may need. * These are not designed to be used as a replacement for normal arrays, as * normal arrays are faster and should be used whenever possible. */ /** * Creates an N Dimensional Array * * @param cellsize The cellsize for the last dimension. * @param ... Each param is the size for a dimension. * * @note The cellsize should only be changed if working with strings or arrays. * @note2 NDim Arrays start zeroed. * * @return The NDim handle. */ stock NDim:NDimCreate( const cellsize=1, ... ) { new argnum = numargs(); if( !argnum ) return Invalid_NDim; new i, total_size = 1; for( i=1; i