Version 3.1 posted which has a new Keyword, CallHostSub, that can be used both as a statement and a function. This is available only to scripts running in optimised compiled applications. In a legacy environment the script will error and halt.
CallHostSub allows a B4Script to directly execute Basic4ppc host program Subs and, as the Sub executes directly rather than going via an event, it has much, much higher performance than CallHost. It provides a much easier and more direct way of allowing a script access to host program functionality, particularly for anyone writing a plug-in.
The downside is that, like a Thread Sub, a Sub called by CallHostSub must not touch GUI elements if it is not running on the main thread. For this you must use CallHost, Print or Msgbox events.
Note that BasicLib.New1 now requires "B4PObject(1)" as a parameter.