문제

According to the DOORS Reference Manual, this code will print the source module identification of an inlink:

Object o = current

string srcModName

for srcModName in o<-"*" do print srcModName "\n"

This does work, however what I'm trying to do is print the target module identification of an outlink. I thought simply switching o<- to o-> would do the trick, but it doesn't. Does anyone know why, and how to fix this?

도움이 되었습니까?

해결책

Not sure why that doesn't work but this does:

Object o = current
string tgtMod
Link l

for l in o -> "*" do
{
  tgtMod = target(l)
  print tgtMod "\n"
}

다른 팁

It doesn't work simply because there is no loop construct with that signature. All you have to work with is what's listed in the DXL Reference Manual.

EDIT: I forgot to mention though that Steve's answer is the way to do it if you just want the name of the target module.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top