ByRef is just flavor text, only passing by dot matters.

Passing an object via dot to ByRef method argument means your code can return other object. If you only modify an existing object you don't need to use ByRef or pass object via dot.

I recommend using ByRef only in cases where you need to return different object.

Set terminal prompt.

  • For everyone: Config.Startup:SetTerminalPrompt
  • For current process: $system.Process.TerminalPrompt  

To set system mode set ^%SYS("SystemMode") global to whatever value you want. Highlighted values are: LIVE, TEST, DEVELOPMENT, FAILOVER.

I just wish there was a way to default the terminal colours

Easy to do that.

Create %ZSTART routine:

LOGIN
    // Color options. 54 - red
    // for i=1:1:60 write $j(i,2),"  ",$C(27)_"["_i_"m"_"Hello"_$C(27)_"[0m",!
    write $C(27)_"[54m"
    quit 1

And done.

Here's the result

Well, maybe Apache POI would be better.

In my opinion the best approach to MS Office docs is to try things with the real-life samples. Far to many combinations to try to predict anything.

Apache POI can write to Excel files, you can extend the current integration if you want.