Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有标签的表单,我想在其中放置 Real 类型的变量 'accuracy' 和符号 '%'(例如,格式为 57,49%)。甚至可以使用标签吗?我尝试使用谷歌搜索,但没有找到任何相关内容。非常感谢。
Label1.Caption := Format('%.2f%%', [accuracy]);
第二个%转义百分比符号并将其视为实际字符串的一部分(而不是格式字符串)。
%