string result = null
string s
string indic 
indic = obj."Change Indicator"

Module currMod = current
AttrDef attrdefn
string attrname
History h
HistoryType ht
Array modfattrs = create (50,3)
int nrattrs = 0
int counter
int found
int linksmod = 0

Buffer difference = create
string oldval, newval
Buffer oldvalb = create
Buffer newvalb = create
string Sdiff

if (!null indic) {
  for h in obj do {
    ht = h.type

    //Process each Modify record, but only those that impact changebarsd
    if (ht == modifyObject) {
      attrname = h.attrName
      attrdefn = find(currMod,attrname)
	
      //Only mods to attrs that impact change bars are considered
      if (!attrdefn.nobars) {
        //check if we've seen this attribute being modified before (using array to store each attr seen)
        counter = 1
        found = 0
        while (counter <= nrattrs) {
  	if ((string get(modfattrs,counter,1)) == attrname) {
	    found = 1
	  }
  	counter ++
        }
  
        if (found == 0) {  //haven't seen this attr before (it's not in our array) - place its name and orig value in array
  	oldval = h.plainOldValue
	  nrattrs++
  	put (modfattrs,attrname,nrattrs,1)
	put (modfattrs,oldval,nrattrs,2)
        }
      }
    }

    //Look for updates tolinks (only register once)
    if ((ht == createLink || ht == deleteLink) && linksmod == 0) {
      nrattrs++
      put (modfattrs,"links modified",nrattrs,1)
      linksmod = 1
    }    

  }


  //now loop through each change noted - for modifies, compare its original value with its current
  counter = 1
  while (counter <= nrattrs) {
    if (!null result) result = result "\n\n"
    attrname = (string get(modfattrs,counter,1))
    if (attrname == "links modified") {
      result = result "{\\b >Links: } Modified"
    } else {
      oldvalb = (string get(modfattrs,counter,2))
      newvalb = obj.attrname
      Sdiff = diff(difference, oldvalb, newvalb, "\\strike ", "\\ul ")
      if (attrname == "Object Heading") {
        result = result "{\\b " number(obj) "}" difference ""
      } else {
        if (attrname == "Object Text") {
          result = result difference ""
        } else {
          result = result "{\\b " attrname ": } " difference ""
        }
      }
    }
    counter++
  }

}

if(!isDeleted obj) obj.attrDXLName = richText(result)
delete oldvalb
delete newvalb
delete difference