1. drmaa2_list_size(3)
  2. DRMAA2
  3. drmaa2_list_size(3)

NAME

drmaa2_list_size - drmaa2_list_size, Determines the size of the list.

SYNOPSIS

#include "drmaa2.h"

long drmaa2_list_size(const drmaa2_list list)

DESCRIPTION

Determines the amount of entries in the given list and returns the value.

RETURN VALUES

Returns the amount of entries in the given list. The value is 0 or greater. In case of any errors (e.g. list is NULL), 0 is returned.

EXAMPLE

drmaa2_string_list strings = drmaa2_create_list(DRMAA2_STRINGLIST, 
                                   (drmaa2_list_entryfree) drmaa2_string_free);

drmaa2_list_add(strings, strdup("string one"));
drmaa2_list_add(strings, strdup("string two"));

printf("List size: %ld\n", drmaa2_list_size(strings));

drmaa2_list_free(&strings); 

SEE ALSO

drmaa2_list_create(3), drmaa2_list_free(3), drmaa2_list_add(3), drmaa2_list_del(3), drmaa2_list_size(3), drmaa2_list_has(3), drmaa2_lasterror(3), drmaa2_lasterror_text(3)

AUTHOR

Copyright Univa Corporation 2013

  1. Univa Corporation
  2. October 2013
  3. drmaa2_list_size(3)