Initializing help system before first use

getsize

Purpose
Get the size of an array, set, list, constraint or string.
Synopsis
function getsize(a:array):integer
function getsize(s:set):integer
function getsize(l:list):integer
function getsize(t:string):integer
function getsize(c:linctr):integer
Arguments
An array
A set
A list
A string
A linear constraint
Return value
Number of effective entries for an array, number of elements for a set or a list, number of characters for a string, number of terms for a constraint.
Example
In the following, a dynamic array is declared holding eight elements, of which only two are actually defined. Calling getsize on this array returns 2 rather than 8. The length lw of the string w is 9.
declarations
 a:dynamic array(1..8) of real
 w = "some text"
end-declarations

a(1):= 4
a(5):= 7.2
la:= getsize(a)
lw:= getsize(w)
Further information
In the case of a dynamic array that has been declared with a maximal range this number may be smaller than the size of the range, but it cannot exceed it. When used with a string, this function returns the length of the string ( i.e. the number of characters it contains). If used with a linear constraint, this function returns the number of terms of the constraint (the constant term is not taken into account).

© 2001-2025 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.