Цитата:
Сообщение от
Владимир Максимов
а нам действительно надо знать, что это именно map?
нет конечно, реальную задачу я переформулирую, чтобы обойтись и без этого )))
а вот для себя хотелось бы понять - есть ли способ "действительно знать".
я чуток подправил псевдокод, чтобы было понятно где и какой именно результат хотелось бы получить
X++:
str TheUltimateQuestionOfLifeTheUniverseAndEverything(anytype mapOrTable)
{
if( /* Deep Thought question: mapOrTable is CustVendTable */ )
return 'nirvana';
return '42';
}
static void main(Arga args)
{
CustTrans ctr;
VendTrans vtr;
CustVendTrans mapTr;
CustVendTrans mapTrInit = vtr;
CustTable ct;
VendTable vt;
CustVendTable mapT;
CustVendTable mapTinit = ct;
debug::assert('42' == TheUltimateQuestionOfLifeTheUniverseAndEverything (ctr));
debug::assert('42' == TheUltimateQuestionOfLifeTheUniverseAndEverything (vtr));
debug::assert('42' == TheUltimateQuestionOfLifeTheUniverseAndEverything (maptr));
debug::assert('42' == TheUltimateQuestionOfLifeTheUniverseAndEverything (maptrInit));
debug::assert('42' == TheUltimateQuestionOfLifeTheUniverseAndEverything (ct));
debug::assert('42' == TheUltimateQuestionOfLifeTheUniverseAndEverything (vt));
debug::assert('nirvana' == TheUltimateQuestionOfLifeTheUniverseAndEverything (mapTinit));
debug::assert('nirvana' == TheUltimateQuestionOfLifeTheUniverseAndEverything (mapT));
}