DeleteArrayObject
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © RozaniGhani-RG

//@version=5

// @description TODO: Delete array object according to array size
library('DeleteArrayObject')

// 0. Delete array label[]
// 1. Delete array line[]
// 2. Delete array linefill[]
// 3. Delete array box[]
// 4. Delete array table[]
// 5. Examples

// ————————————————————————————————————————————————————————————————————————————— 0. Delete array label[] {
export delete(simple label[] _id) =>
    for x = 0 to array.size(_id) - 1
        label.delete(array.get(_id, x))
// }
// ————————————————————————————————————————————————————————————————————————————— 1. Delete array line[] {
export delete(simple line[] _id) =>
    for x = 0 to array.size(_id) - 1
        line.delete(array.get(_id, x))
// }
// ————————————————————————————————————————————————————————————————————————————— 2. Delete array linefill[]  {
export delete(simple linefill[]_id) =>
    for x = 0 to array.size(_id) - 1
        linefill.delete(array.get(_id, x))
// }
// ————————————————————————————————————————————————————————————————————————————— 3. Delete array box[] {
export delete(simple box[] _id) =>
    for x = 0 to array.size(_id) - 1
        box.delete(array.get(_id, x))
// }        
// ————————————————————————————————————————————————————————————————————————————— 4. Delete array table[] {
export delete(simple table[] _id) =>
    for x = 0 to array.size(_id) - 1
        table.delete(array.get(_id, x))
// } 
// ————————————————————————————————————————————————————————————————————————————— 5. Examples {
var array_label    = array.new_label(6),    delete(array_label)
var array_line     = array.new_line(6),     delete(array_line)
var array_linefill = array.new_linefill(5), delete(array_linefill)
var array_box      = array.new_box(4),      delete(array_box)
var array_table    = array.new_table(4),    delete(array_table)
// } 