Titan



isvalue


This function returns the value true if and only if the template parameter is completely initialized, thus, contains only concrete or omitted values.


Related keyword:


isvalue (in template any_type inparameter)return boolean


Example 1:

type record  MyRecordType { 
   integer field1 optional,
   integer field2 optional
}
...

var MyRecordType v_MyRecord;
var template MyRecordType vt_MyRecordTemplate;
...

isvalue(v_MyRecord); // return false
isvalue(vt_MyRecordTemplate); // return false
...

v_MyRecord := { field1 := 5, field2 := omit}
vt_MyRecordTemplate := { field1 := ?, field2 := 5}
...

isvalue(v_MyRecord); // return true
isvalue(v_MyRecord.field2); // return false
isvalue(vt_MyRecordTemplate); // return false
isvalue(vt_MyRecordTemplate.field1); // return false
isvalue(vt_MyRecordTemplate.field2); // return true