Is there a description anywhere of how Format works?
What does the %` do in the code below?
What does ~date1 return?
void Days::Compute()
{
result = IsNull(date1) || IsNull(date2) ? "" :
Format("There is %d day(s) between %` and %`",
abs(Date(~date1) - Date(~date2)), ~date1, ~date2);
}
The code is from the days example on the website. Which Date constructor is used - the copy constructor ???
(Should I be able to find this info in the help?)
Graeme
Not yet, sorry.
Format works by converting arguments to Value. It is otherwise mostly similar to printf-like formatting, however there are differences. The most important one is that Format is extensible - you can register additional format specifiers and additional types.