https://github.com/r0mb0/dynamic_array_classic_asp
Collection of libraries and classes for having dynamic arrays on classic asp.
https://github.com/r0mb0/dynamic_array_classic_asp
asp-classic class classic-asp classic-asp-lang classic-asp-language dynamic-array dynamic-arrays italian-developers library r0mb0
Last synced: 3 months ago
JSON representation
Collection of libraries and classes for having dynamic arrays on classic asp.
- Host: GitHub
- URL: https://github.com/r0mb0/dynamic_array_classic_asp
- Owner: R0mb0
- License: mit
- Created: 2024-10-17T11:21:17.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-12-05T09:58:29.000Z (7 months ago)
- Last Synced: 2025-03-10T06:16:45.947Z (3 months ago)
- Topics: asp-classic, class, classic-asp, classic-asp-lang, classic-asp-language, dynamic-array, dynamic-arrays, italian-developers, library, r0mb0
- Language: Classic ASP
- Homepage:
- Size: 92.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
- Security: SECURITY.md
- Support: SUPPORT.md
Awesome Lists containing this project
README
# Dynamic array in Classic ASP
[](https://app.codacy.com/gh/R0mb0/Dynamic_array_classic_asp/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://github.com/R0mb0/Dynamic_array_classic_asp)
[](https://github.com/R0mb0/Dynamic_array_classic_asp)
[](https://opensource.org/license/mit)[](http://paypal.me/R0mb0)
## `Dynamic_array.asp`'s avaible Functions
- **Initialize the array** -> `initialize_array()`
- **Check if the array is initializated** -> `is_array_initializated()`
- **Add an element into the array** -> `add_element_to_array(element)`
- **Get element from index** -> `get_element_from_array(idx)`
- **Remove last element from array** -> `remove_last_element_from_array()`
- **Remove an element from array** -> `remove_all_occurences_from_array(element)`
- **Remove the first element occurence from array** -> `remove_first_occurence_from_array(element)`
- **Remove element from index** -> `remove_this_elements_from_array(idx)`
- **Remove elements from indices** -> `remove_these_elements_from_array(indices_array)`
- **Reset the array** -> `initialize_array()`
- **Check if an element is in the array** -> `array_contains(element)`
- **Retrieve the first index of an element in the array** -> `from_array_get_first_index_occurence_of(element)`
- **Retrieve all indeces of an element inside the array (return an array)** -> `from_array_get_all_indeces_occurence_of(element)`
- **Retrieve the entire array** -> `get_array()`
- **Retrieve the array dimension** -> `get_array_dimension()`
- **Write the entire array** -> `write_array()`## How to use:
> From `Test1.asp`
1. Initialize the array and check it's status
```asp
<%@LANGUAGE="VBSCRIPT"%>
<%
initialize_array()
Response.Write("Array status: ")
Response.Write(is_array_initializated() & "
")
```
2. Use the functions to manage the array
```asp
add_element_to_array("A")
add_element_to_array("B")
add_element_to_array("C")
add_element_to_array("D")
Response.Write("Elements inside: ")
write_array()
%>
```
## `Dynamic_arrays.asp`'s avaible Functions
- **Initialize a dynamic array** -> `get_initializated_dynamic_array()`
- **Add an element into a dynamic array** -> `add_element_to_dynamic_array(my_array,element)`
- **Get element from index** -> `get_element_from_dynamic_array(my_array,idx)`
- **Remove last element from a dynamic array** -> `remove_last_element_from_dynamic_array(my_array)`
- **Remove all element occurences from a dyamic array** -> `remove_all_occurences_from_dynamic_array(my_array,element)`
- **Remove first element occurence from a dynamic array** -> `remove_first_occurence_from_dynamic_array(my_array,element)`
- **Remove element from index** -> `remove_this_elements_from_dynamic_array(my_array,idx)`
- **Remove elements from indices** -> `remove_these_elements_from_dynamic_array(my_array,indices_array)`
- **Reset a dynamic array** -> `get_initializated_dynamic_array()`
- **Check if an element is in the dynamic array** -> `dynamic_array_contains(my_array,element)`
- **Retrieve the first index of an element inside a dynamic array** -> `from_dynamic_array_get_first_index_occurence_of(my_array,element)`
- **Retrieve all indeces of an element inside the dynamic array (return an array)** -> `from_dynamic_array_get_all_indeces_occurence_of(my_array,element)`
- **Retrieve the dynamic array dimension** -> `get_dynamic_array_dimension(my_array)`
- **Write an entire dynamic array** -> `write_dynamic_array(my_array)`## How to use:
> From `Test.asp`
1. Create array and initialize it
```asp
<%@LANGUAGE="VBSCRIPT"%>
<%
Dim test_array
test_array = Array()
test_array = get_initializated_dynamic_array()
```
2. Pass the array to functions for manage
```asp
add_element_to_dynamic_array test_array,"A"
add_element_to_dynamic_array test_array,"B"
add_element_to_dynamic_array test_array,"C"
write_dynamic_array(test_array)
%>
```
## `dArray.class.asp`'s avaible Functions
- **Initialize class** -> `sub class_initialize()`
- **Terminate class** -> `sub class_terminate()`
- **Add an element** -> `Public Function add_element(element)`
- **Get element from index** -> `Public Function get_element(idx)`
- **Get array dimension** -> `Public Function get_dimension()`
- **Remove last element** -> `Public Function remove_last_element()`
- **Remove all element occurences** -> `Public Function remove_all_occurences(element)`
- **Remove first element occurence** -> `Public Function remove_first_occurence(element)`
- **Remove element from index** -> `Public Function remove_this_element(idx)`
- **Remove elements from indices** -> `Public Function remove_these_elements(indices_array)`
- **Reset** -> Re-initialize the class
- **Check if an element is present** -> ` Public Function contains(element)`
- **Retrieve the first index of an element** -> `Public Function get_first_index_occurence_of(element)`
- **Retrieve all indeces of an element (return an array)** -> `Public Function get_all_indeces_occurence_of(element)`
- **Write the entire array** -> ` Public Function write_array()`## How to use:
> From `Test.asp`
1. Initialize the class
```asp
<%@LANGUAGE="VBSCRIPT"%>
<%
Dim da
Set da = new dArray
```
2. Use the class
```asp
da.add_element("A")
da.add_element("B")
da.add_element("C")
da.add_element("D")
da.add_element("A")
da.add_element("B")
da.add_element("C")
da.add_element("D")
da.add_element("A")
Response.Write("Elements inside: ")
da.write_array()
%>
```