Providing an implementation for our new method basically means we need to provide an IInvokable implementor. The MakeInvokable function (in the System.Bindings.Methods unit) will accept an anonymous method as an argument and return an implementor of the IInvokable interface. The anonymous method will get the arguments (parsed from the actual expression) as input parameters in the form of a dynamic array of IValue (another interface type defined in the System.Bindings.EvalProtocol unit), and will then return another IValue instance containing the result.
We expect two or three arguments to be passed to our FormatFloat method in our LiveBindings expressions:
- FormatString: This is a string that's used to specify the desired format for the number.
- FloatValue: This is a floating-point (Extended) value that needs to be formatted.
- Locale: This is an optional string identifier of the desired locale settings to...