drmaa2_list_del
- drmaa2_list_del, Removes an existing element from the list.
#include "drmaa2.h"
drmaa2_error drmaa2_list_del(const drmaa2_list list, const long pos)
Deletes a new element in the given list. When the list was created with a callback function, the callback is called for the element before it is removed from the list.
Returns DRMAA2_SUCCESS
in case of success or an drmaa2_error
value in case of an error. The error condition can be read out by drmaa2_lasterror_text(3).
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"));
drmaa2_list_del(strings, 0);
const drmaa2_string string = (const drmaa2_string) drmaa2_list_get(strings, 0);
printf("First element of the list %s\n", (const char *) string);
drmaa2_list_free(&strings);
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)
Copyright Univa Corporation 2013