Delphi中如何声明ANSI字符串并确定其数组大小?
- 内容介绍
- 相关推荐
本文共计408个文字,预计阅读时间需要2分钟。
在Delphi旧代码中,定义一个大小为3的字符串数组可能如下所示:
delphist: string[3];
现在,为了适应ANSI类型,可以将代码修改为:
delphist: ansistring[3];
对于Advanced OEM类型,可以使用:
delphist: oemstring[3];
同样的问题,如果在某个地方定义了`type OemString='Type'`,可能需要确保这种定义不会引起混淆。
本文共计408个文字,预计阅读时间需要2分钟。
在Delphi旧代码中,定义一个大小为3的字符串数组可能如下所示:
delphist: string[3];
现在,为了适应ANSI类型,可以将代码修改为:
delphist: ansistring[3];
对于Advanced OEM类型,可以使用:
delphist: oemstring[3];
同样的问题,如果在某个地方定义了`type OemString='Type'`,可能需要确保这种定义不会引起混淆。

