简体   繁体   English

如何在Delphi XE3中将String转换为LongInt?

[英]How to convert String to LongInt in Delphi XE3?

How to convert String to LongInt in Delphi XE3? 如何在Delphi XE3中将String转换为LongInt? strtoInt & strToint64 are for variables of types less than LongInt. strtoInt和strToint64用于小于LongInt类型的变量。

Looking at its signature , I don't think StrToInt is for int less than longint. 它的签名来看,我认为StrToInt比int短于longint。 Integer is an alias for LongInt in Delphi by default. 默认情况下,Integer是Delphi中LongInt的别名。 Here is the table for those types. 是这些类型的表。

The ...StrToInt...() overloads that work with Integer values will be fine. 使用Integer值的...StrToInt...()重载就可以了。 Integer and LongInt are the same byte size. IntegerLongInt的字节大小相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM