Hi,
I need a simple function for formatting a string, like in Python or C#. That's easy:
Class Very.Very.Long.Class.Name
{
ClassMethod Format(fmt As %String, args...) As %String [ Language = python ]
{
return fmt.format(*args)
}
}
To simplify calls, I want to wrap the function into a macro:
ROUTINE StringUtil [Type=INC]
#define FMT(%fmt,%a0) ##class(Very.Very.Long.Class.Name).Format(%fmt,%a0)
/// #define FMT(%fmt,%a0,%a1) ##class(Very.Very.Long.Class.Name).Format(%fmt,%a0,%a1)
/// #define FMT(%fmt,%a0,%a1,%a2) ##class(Very.Very.Long.Class.Name).Format(%fmt,%a0,%a1,%a2)
/// #define FMT(%fmt,%a0,%a1,%a2,%a3) ##class(Very.Very.Long.Class.Name).Format(%fmt,%a0,%a1,%a2,%a3)
/// #define FMT(%fmt,%a0,%a1,%a2,%a3,%a4) ##class(Very.Very.Long.Class.Name).Format(%fmt,%a0,%a1,%a2,%a3,%a4)