tuple timeperiod {
string TimePeriodID;
string TimePeriodName;
float CurrencyRate;
float Rank;
string ActivePeriod;
}
{timeperiod} TimePeriods = {<"A","B",1.0,2.3,"NO">,<"V","B",4.0,2.3,"YES">,<"D","B",4.0,2.3,"YES">};
string answer=first({i | i in TimePeriods : i.ActivePeriod=="YES"}).TimePeriodID;
execute
{
writeln(answer);
}
дает
V