Initializing help system before first use

testtype

Purpose
Test the return value of findident.
Synopsis
function testtype(rts:integer, props:integer):boolean
Arguments
rts 
Return value of findident
props 
Properties to test (can be combined by addition):
STRUCT_* 
A structure ( e.g. STRUCT_ARRAY)
*.id 
A type ID ( e.g. integer.id)
EPROP_PRIV 
Entity is private
EPROP_PUBLIC 
Entity is public
EPROP_CONST 
Entity is constant
EPROP_VAR 
Entity is not constant
EPROP_RANGE 
Entity is a range set
EPROP_GENSET 
Entity is a general set ( i.e. not a range)
EPROP_DENSE 
Entity is a dense array
EPROP_SPARSE 
Entity is a sparse array
EPROP_DYNAMIC 
Entity is a sparse dynamic array
EPROP_HASHMAP 
Entity is a sparse hashmap array
Return value
true if the provided encoded type has all the requested properties
Example
public declarations
  Ar: dynamic array(1..10) of real
  S=1..5
  u1,u2:any
end-declarations
r1:=findident("Ar",u1)
r2:=findident("S",u2)
writeln(testtype(r1,STRUCT_ARRAY+EPROP_SPARSE))   ! true
writeln(testtype(r1,EPROP_DENSE))                 ! false
writeln(testtype(r2,EPROP_RANGE+EPROP_CONST))     ! true
writeln(testtype(r2,STRUCT_SET+integer.id))       ! true
Further information
1. This function checks whether an encoded type returned by findident corresponds to a set of properties.
2. The props argument cannot include more than one structure and one type ID each (all conditions must be satisfied at the same time). The function will always return false if it is given an invalid combination (for instance EPROP_CONST+EPROP_VAR or STRUCT_SET+EPROP_DENSE cannot succeed).
Module

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