getname


Purpose
Return the name in the problem of the requested item
Synopsis
function getname(c:genctr | xv:array of xvitem | xvi:xvitem) :string
Arguments
a genctr
xv 
an array of xvitem objects (an XV)
xvi 
an xvitem object
Return value
The name in the problem of the requested item, or an empty name if the item is not in the current problem.
Example
The following example loads a problem and then writes the names of some of the items in the problem:
declarations
 rx: array(A) of genctr
 XVA: array(A,1..10) of xvitem
end-declarations
forall (a in A) writeln(getname(rx(a)))

forall (a in A) writeln(getname(XVA(a,1)))
The first usage writes the names of the members of an array of genctrs.
The second example shows how to handle an array of XVs. A 1-dimensional array of XVs is described as a 2-dimensional array of xvitems (since each XV is itself a 1-dimensional array of xvitems). Use the first item in the XV to access data for the XV.
Further information
This function is only effective when a problem has been loaded.
Related topics
SLPgetname, SLPgetindex


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.