Initializing help system before first use

arrayentryexists

arrayentryexists


Purpose
Check if a named array contains a given entry
Synopsis
function xreflect~arrayentryexists(entityname:string,indices:list of xreflect~basicvalue):boolean
Arguments
entityname 
The name of the public entity to access
indices 
A list containing one value for each index set of the given array
Return value
true if the specified array contains an entry with the given index values, false otherwise
Example
The following:
public declarations
  myvar: dynamic array(set of integer,set of integer) of real,
end-declarations
myvar(1,100) := 5.0
myvar(1,101) := 5.1
myvar(2,101) := 5.2
writeln('exists(2,100)=',arrayentryexists('myvar',[basicvalue(2),basicvalue(101)]))
produces this output:
exists(2,100)=false
Further information
1. If the specified entity name cannot be found, the model will terminate with a runtime error.
2. If the specified entity is not an array, the model will terminate with a runtime error.
3. If the supplied indices list does not contain one basicvalue of the correct type for each index set of the array, the model will terminate with a runtime error.
4. The array index set contents will not be modified by this function
Related topics

© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.