Question

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?

Was it helpful?

Solution

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"
}

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top