functionf_not_a_template()returninteger{//^In function definition//
returnvaluemod2;//^In return statement// //^In the left operand of operation//2 //Reference to value being matched is only allowed inside a dynamic template's statement block//
}
templateintegert2:=@dynamic{}//^In template definition// //The dynamic template's statement block does not have a return statement//
templateintegert3:=@dynamic{return;}//^In template definition// //^In return statement// //Missing return value. The dynamic template's statement block should return a boolean value//
templatefloatt4:=@dynamic{return1;}//^In template definition// //^In return statement// //boolean value was expected//
templateintegert5:=@dynamic{return?;}//^In template definition// //^In return statement// //A specific value without matching symbols was expected as return value//
templateintegert6:=@dynamic{//^In template definition// //Control might leave the dynamic template's statement block without reaching a return statement//
if(value>3){returntrue;}
}
typecomponentCT{
varintegerv_cv;
}
constintegercg_c:=3;
functionf_f()runsonCT{
vartemplateintegervt:=@dynamic{
if(value>cg_c){returntrue;}
v_cv:=value;
returnfalse;
}
}
template(omit)integert7:=@dynamic{returnvaluemod2==0;}//^In template definition// //^While checking template restriction// //Restriction on template definition does not allow usage of dynamic match//
template(value)integert8:=@dynamic{returnvaluemod2==0;}//^In template definition// //^While checking template restriction// //Restriction on template definition does not allow usage of dynamic match//