Applescript sub-procedure problem I would like to display a comma-delimited list of values in a List.  Unfortunately, I get an error that reads Microsoft Outlook got an error: Can’t continue joinList. when I attempt to use the sub-procedure that performs the join:

tell application "Microsoft Outlook"
  ...
  set addressList to {}
  repeat with theAddress in the theAddresses
    if addressList does not contain (address of theAddress) then
      set addressList to addressList &amp; (address of theAddress)
    end if
  end repeat

  display dialog joinList(addressList, ";") &lt;-- error here
  ...
end tell

on joinList(aList, delimiter)
    set retVal to ""
    set prevDelimiter to AppleScript's text item delimiters
    set AppleScript's text item delimiters to delimiter
    set retVal to aList as string
    set AppleScript's text item delimiters to prevDelimiter
    return retVal
end joinList


What am I doing wrong?
The code should have been:

display dialog my joinList(addressList, ";")