Product Site

8.24. SysFormatMessage

Formats and returns a message text, replacing placeholders &n with specified message inserts. SysFormatMessage can replace up to nine placeholders.
message

The message text. This string may include up to nine placeholders &1, &2&9 in any order.
substitutions

Text inserts for message placeholders. This can a be a single string, an Array of strings, or any other object supporting a makeArray method. The first array item is used to replace the &1 placeholder, the second item replaces &2, up to a maximum of nine items.
Example 8.15. RexxUtil — SysFormatMessage
s = .Stream~new("xyzzy")
if \s~open("read")~startsWith("READY") then
  -- Cannot read file 'xyzzy': ERROR:2 No such file or directory
  say SysFormatMessage("Cannot read file '&1': &2", (s~string, s~description))