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.
除了常量RTLVersion,CompilerVersion有什么方法可以获取版本符号VER320而不是跟随代码?
RTLVersion
CompilerVersion
VER320
'VER' + IntToStr(Trunc(CompilerVersion * 10))
这个问题的简单答案是否定的。代码没有枚举条件符号的机制。
您当前的方法可能是您能做的最好的方法,但不能保证编译器的未来版本将遵循当前的VERxxx约定。
VERxxx
当然,你也可以直接报编译器版本。