# IRdBoolArray Interface Reference

Inherits IDispatch, and IDispatch.

List of all members.

## Public Member Functions
HRESULT | Clear (void)
HRESULT | SetDim ([in] RtUlong ulDim)
HRESULT | GetDim ([out, retval] RtUlong *pulDim)
HRESULT | SetSize ([in, satype(VARIANT)]SAFEARRAY *psa)
HRESULT | GetSize ([in, optional] VARIANT optionalDim,[out, retval] RtUlong *pulSize)
HRESULT | SetAt ([in, satype(VARIANT)]SAFEARRAY *psa)
HRESULT | GetAt ([in, satype(VARIANT)]SAFEARRAY *psa,[out, retval] VARIANT *pVal)
HRESULT | Add ([in] VARIANT newVal)
HRESULT | InsertAt ([in] RtUlong ulIndex,[in] VARIANT newVal)
HRESULT | RemoveAt ([in] RtUlong ulIndex)
HRESULT | Clear (void)
HRESULT | SetDim ([in] RtUlong ulDim)
HRESULT | GetDim ([out, retval] RtUlong *pulDim)
HRESULT | SetSize ([in, satype(VARIANT)]SAFEARRAY *psa)
HRESULT | GetSize ([in, optional] VARIANT optionalDim,[out, retval] RtUlong *pulSize)
HRESULT | SetAt ([in, satype(VARIANT)]SAFEARRAY *psa)
HRESULT | GetAt ([in, satype(VARIANT)]SAFEARRAY *psa,[out, retval] VARIANT *pVal)
HRESULT | Add ([in] VARIANT newVal)
HRESULT | InsertAt ([in] RtUlong ulIndex,[in] VARIANT newVal)
HRESULT | RemoveAt ([in] RtUlong ulIndex)

## Detailed Description

IRdBoolArray was designed to create an 'array of booleans' data object:

- Single-dimensional or multi-dimensional.
- It is intended and more effective for storing boolean values than for storing Universal Array Data.

## Member Function Documentation

HRESULT IRdBoolArray::Clear | ( | void |  | ) |

Clear (initialize) the data object.

        var boolAr = params.ConValue('boolAr'); // Common Data Package/Boolean Array Data type.
        boolAr.Clear();

HRESULT IRdBoolArray::SetDim | ( | [in] RtUlong | ulDim | ) |

Set dimension of the array (default is 1or single-dimensional array)

Parameters:

  | ulDim | [in] Dimension value to set array to.

        boolAr.SetDim(10);  // Dimension is set to 10.

HRESULT IRdBoolArray::GetDim | ( | [out, retval] RtUlong * | pulDim | ) |

Get dimension of the array.

Returns:
  pulDim [out, retval] Return dimension.

        boolAr.SetDim(10);
        System.Alert(boolAr.GetDim());

HRESULT IRdBoolArray::SetSize | ( | [in, satype(VARIANT)] SAFEARRAY * | psa | ) |

Set array size (one number for each dimension).

- Note: The Add method automatically increases the size in case of single-dimensional array.

Parameters:

  | psa | [in] Set size of array - one for each dimension.

        boolAr.SetDim(2);
        boolAr.SetSize(10, 10);

HRESULT IRdBoolArray::GetSize | ( | [in, optional] VARIANT | optionalDim,
|  | [out, retval] RtUlong * | pulSize |
| ) |  |  |

Get array size (one number for each dimension).

Parameters:

  | optionalDim | [in] Optional, requested dimension to get size for (zero-based).

Returns:
  pulSize [out, retval] Return size for given dimension.

        boolAr.SetDim(2);
        boolAr.SetSize(10, 10);
        System.Alert(boolAr.GetSize(0));
        System.Alert(boolAr.GetSize(1));

HRESULT IRdBoolArray::SetAt | ( | [in, satype(VARIANT)] SAFEARRAY * | psa | ) |

Set one item to the array at given position.

- Array indices are zero-based.

Parameters:

  | psa | [in] Variable number of item coordinates, the last parameter is the item value to be set.

        boolAr.SetAt(2, 0); // Set item to a single-dimensional array.

        boolAr.SetAt(3, 5, -1); // Set item to a multi-dimensional array.

HRESULT IRdBoolArray::GetAt | ( | [in, satype(VARIANT)] SAFEARRAY * | psa,
|  | [out, retval] VARIANT * | pVal |
| ) |  |  |

Get one item from array at given position.

- Array indices are zero-based.

Parameters:

  | psa | [in] Variable number of item coordinates.

Returns:
  pVal [out, retval] Return item value.

        var item = boolAr.GetAt(5); // Get item from a single-dimensional array.

        var item = boolAr.GetAt(0,5); // Get item from a multi-dimensional array.

HRESULT IRdBoolArray::Add | ( | [in] VARIANT | newVal | ) |

Append new item to the array:

- Note: only works for single-dimensional arrays!

Parameters:

  | newVal | [in] New item value.

        var newValue = 0;
        boolAr.Add(newValue);

HRESULT IRdBoolArray::InsertAt | ( | [in] RtUlong | ulIndex,
|  | [in] VARIANT | newVal |
| ) |  |  |

Insert new item at specified position, increasing array size:

- Note: only works for single-dimensional arrays!

Parameters:

  | ulIndex | [in] Zero based array index.
  | newVal | [in] New item value.

        var newValue = -1;
        boolAr.InsertAt(0, newValue);

HRESULT IRdBoolArray::RemoveAt | ( | [in] RtUlong | ulIndex | ) |

Remove item with specified index, decreasing array size

- Note: only works for single-dimensional arrays!

Parameters:

  | ulIndex | [in] Zero based array index.

        boolAr.RemoveAt(1);

HRESULT IRdBoolArray::Clear | ( | void |  | ) |

Clear (initialize) the data object.

        var boolAr = params.ConValue('boolAr'); // Common Data Package/Boolean Array Data type.
        boolAr.Clear();

HRESULT IRdBoolArray::SetDim | ( | [in] RtUlong | ulDim | ) |

Set dimension of the array (default is 1or single-dimensional array)

Parameters:

  | ulDim | [in] Dimension value to set array to.

        boolAr.SetDim(10);  // Dimension is set to 10.

HRESULT IRdBoolArray::GetDim | ( | [out, retval] RtUlong * | pulDim | ) |

Get dimension of the array.

Returns:
  pulDim [out, retval] Return dimension.

        boolAr.SetDim(10);
        System.Alert(boolAr.GetDim());

HRESULT IRdBoolArray::SetSize | ( | [in, satype(VARIANT)] SAFEARRAY * | psa | ) |

Set array size (one number for each dimension).

- Note: The Add method automatically increases the size in case of single-dimensional array.

Parameters:

  | psa | [in] Set size of array - one for each dimension.

        boolAr.SetDim(2);
        boolAr.SetSize(10, 10);

HRESULT IRdBoolArray::GetSize | ( | [in, optional] VARIANT | optionalDim,
|  | [out, retval] RtUlong * | pulSize |
| ) |  |  |

Get array size (one number for each dimension).

Parameters:

  | optionalDim | [in] Optional, requested dimension to get size for (zero-based).

Returns:
  pulSize [out, retval] Return size for given dimension.

        boolAr.SetDim(2);
        boolAr.SetSize(10, 10);
        System.Alert(boolAr.GetSize(0));
        System.Alert(boolAr.GetSize(1));

HRESULT IRdBoolArray::SetAt | ( | [in, satype(VARIANT)] SAFEARRAY * | psa | ) |

Set one item to the array at given position.

- Array indices are zero-based.

Parameters:

  | psa | [in] Variable number of item coordinates, the last parameter is the item value to be set.

        boolAr.SetAt(2, 0); // Set item to a single-dimensional array.

        boolAr.SetAt(3, 5, -1); // Set item to a multi-dimensional array.

HRESULT IRdBoolArray::GetAt | ( | [in, satype(VARIANT)] SAFEARRAY * | psa,
|  | [out, retval] VARIANT * | pVal |
| ) |  |  |

Get one item from array at given position.

- Array indices are zero-based.

Parameters:

  | psa | [in] Variable number of item coordinates.

Returns:
  pVal [out, retval] Return item value.

        var item = boolAr.GetAt(5); // Get item from a single-dimensional array.

        var item = boolAr.GetAt(0,5); // Get item from a multi-dimensional array.

HRESULT IRdBoolArray::Add | ( | [in] VARIANT | newVal | ) |

Append new item to the array:

- Note: only works for single-dimensional arrays!

Parameters:

  | newVal | [in] New item value.

        var newValue = 0;
        boolAr.Add(newValue);

HRESULT IRdBoolArray::InsertAt | ( | [in] RtUlong | ulIndex,
|  | [in] VARIANT | newVal |
| ) |  |  |

Insert new item at specified position, increasing array size:

- Note: only works for single-dimensional arrays!

Parameters:

  | ulIndex | [in] Zero based array index.
  | newVal | [in] New item value.

        var newValue = -1;
        boolAr.InsertAt(0, newValue);

HRESULT IRdBoolArray::RemoveAt | ( | [in] RtUlong | ulIndex | ) |

Remove item with specified index, decreasing array size

- Note: only works for single-dimensional arrays!

Parameters:

  | ulIndex | [in] Zero based array index.

        boolAr.RemoveAt(1);