Please let me have a checkbox "display in dateformat".
Often I have data in the format double, e.g. 45122.
That should now be fully possible in 3.99. See image.
In the image, it has been set to show both, the human readable date, and the float. That can be configured. (red box)
You can also configure the format for the date (see
https://www.freepascal.org/docs-html/rtl/sysutils/formatchars.html ). (green box)
Different formats can be given for each type (TDate, TTime, TDateTime). So you can decide what happens if a TDate has a time different from 0.
You can add other types (yellow box), if you have your own
You can also repeat the config, and add different setting for different nest levels. That is values shown in the array could be shown shorter.
If the array gets expanded (and each element listed in its own line) then those expanded values are at nestlevel = 0 (top level).
But in the single line display, where all array entries are coma separated, they are at level=1 (or in the case where the array is in a record, they are at level 2)
You can also set the formatter for each watch. (blue box / watch properties)
- You can disable the formatter
- You can choose a specific one (if you have set up formatters with different format-string yyddmm...)
- You can set up formatters inactive (Not checking the checkbox in the options list), and those will not be applied unless specifically selected in the watch properties)
There is a topic on "value formatters" https://forum.lazarus.freepascal.org/index.php/topic,66186.0.htmlFrom the thread https://forum.lazarus.freepascal.org/index.php/topic,66398.msg508570.html#msg508570
It would be nice if the characters in a null terminated array of characters were displayed without single quotes and without commas separating them.
I added a value formatter, that will show an array of char as string.
You can add the value converter (global or per project).
-
To add a new formatter, first select the type-of-formatter in the drop down, then press add.- "match type by name" (brown box) you would probably want an "*", so it acts on any typename. (It will only act if it is an array of char).
- There is a checkbox (brown box), to select if it should stop at the last char before the first #0 encountered.
- You do want "Replace/Hide original value", or the array data is shown on the same line before/after the string.
It only changes the displayed value (and what gets copied to clipboard).
At current it does not prevent the watches window from showing a [ + ] symbol to expand the array.
Please test.