Hi Guys !
I have a question regarding the SimTalk types of two attributes (one is of attrType "table", the other "list"):
print getSimTalkTypename(self.t) -- prints "list" print getSimTalkTypename(self.l) -- prints "list" print "______________________" print self.getAttrType(self.getAttrNo("t")) -- prints "table" print self.getAttrType(self.getAttrNo("l")) -- prints "list"
Something doesn't seem clear to me, the distinction between lists and tables exists in the attrType but not in the SimTalk syntax (both are of SimTalkTypename "list").
I understand that probably in the core of SimTalk, a list is only a specific case of a table (1 column) but the fact that lists and tables are differenciated in attrTypes can lead to confusions.
Example: I have a method which has N params, an array containing some of these N param names is declared in the method and I want to browse this array and act according to the param type. One param is a list and the other one is a table but the SimTalkTypename is "list" for both of them...
We changed the way this method is written so it's not a problem anymore for us but I still want to know what you think about this. Maybe your clarifications will put my mind at peace
Solved! Go to Solution.
You are right that this is a bit confusing. Nevertheless we do not want to change the behavior of getSimTalkTypeName for compatibility reasons. You can use the SimTalk function isTable to check if a variable or attribute is a table. The SimTalk functions isList, isStack, isQueue check for lists, queues, stacks.
We talked about getSimTalkTypeName and we came to the conclusion that the current behavior is unreasonable. We decided to change the behavior in version 14.2.