Use Resources for this string

The SysUtils unit in Delphi contains variables that contain localised day and month names in both long and short format. It might be better to use these than to write the text. eyebol makes this suggestion and adds a comment after the code to make it just as readable as the original code. For example:

sDay:=’Saturday’;

Could be written as :

sDay := SysUtils.LongDayNames[7] {Saturday};

eyebol can apply this suggestion automatically whilst placing the textual name in a comment to keep the code readable.

 




< Back to list of hints and warnings