1/* array.asc -- written by Alexis WILKE for Made to Order Software Corp. (c) 2005-2009 */ 2 3/* 4 5Copyright (c) 2005-2009 Made to Order Software Corp. 6 7Permission is hereby granted, free of charge, to any 8person obtaining a copy of this software and 9associated documentation files (the "Software"), to 10deal in the Software without restriction, including 11without limitation the rights to use, copy, modify, 12merge, publish, distribute, sublicense, and/or sell 13copies of the Software, and to permit persons to whom 14the Software is furnished to do so, subject to the 15following conditions: 16 17The above copyright notice and this permission notice 18shall be included in all copies or substantial 19portions of the Software. 20 21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 22ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 23LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 24FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO 25EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 26LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 27WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 28ARISING FROM, OUT OF OR IN CONNECTION WITH THE 29SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 30SOFTWARE. 31 32*/ 33 34intrinsic package Global 35{ 36 dynamic class Array 37 { 38 // NOTE: no copy operator 39 function Array(Void) : Void; 40 function Array(element_count : Integer) : Void; 41 function Array(element0 : Object, ...) : Void; 42 43 function concat(element0 : Object, ...) : Array; 44 function join(separator : String) : String; 45 function pop(Void) : Object; 46 function push(value : Object, ...) : Integer; 47 function reverse(Void) : void; 48 function shift(Void) : Object; 49 function slice(start : Integer, end : Integer) : Array; 50 function sort(unchecked option : Integer) : Array; 51 function sort(compare_function : Function) : Array; 52 function sort(compare_function : Function, unchecked option : Integer) : Array; 53 function sortOn(field_name : String, unchecked option : Integer) : Array; 54 function sortOn(field_names : Array, unchecked option : Integer) : Array; 55 function splice(start : Integer, delete_count : Integer, unchecked obj : Object, ...) : Array; 56 function toString(Void) : String; 57 function unshift(obj : Object, ...) : Integer; 58 59 const var length : Integer; 60 61 const var CASEINSENSITIVE : Integer = 1; 62 const var DESCENDING : Integer = 2; 63 const var UNIQUESORT : Integer = 4; 64 const var RETURNINDEXEDARRAY : Integer = 8; 65 const var NUMERIC : Integer = 16; 66 } 67} 68 69