1、resourcestring和const在使用上完全相同。只不过resourcestring将字符串变为资源,如果开发多语言版本,那么resourcestring就非常必要了。
2、为什么要用数组指针?指针数组就更没有必要。
type
PointerArray = array[0..100] of Pointer; //指针数组
IntArray = array[0..100] of Integer;
ArrayPointer = ^IntArray; //数组指针
2、为什么要用数组指针?指针数组就更没有必要。
type
PointerArray = array[0..100] of Pointer; //指针数组
IntArray = array[0..100] of Integer;
ArrayPointer = ^IntArray; //数组指针
例如:
resourcestring
CreateError = 'Cannot create file %s';
OpenError = 'Cannot open file %s';
LineTooLong = 'Line too long';
ProductName = 'Borland Delphi\000\000';
SomeResourceString = SomeTrueConstant;
至于數組指針 和 指針數組
声明如下:
PArray = array[0..10] of Pointer; //指针数组 IntArray = array[0..10] of Integer;//先定义一个数组
ArrayPointer = ^IntArray;//数组指针;其实这些在delphi help中都有,看看你就会明白的;