在程序中,没有任何区别。真正的区别是编译器产生代码时的发生的。
如果是resourcestring,那么编译器将把其编译到资源文件中,
而如果是const,那么编译器则把它编译到代码的数据段中。
Delphi的Demos下有一个resExplorer,你看看编译的程序,就能找到相应的resourcestring,而无非找到const中string。

解决方案 »

  1.   

    CSDN真是毛病,这么晚了,还服务器忙。
      

  2.   

    Resource strings are stored as resources and linked into the executable or library so that they can be modified without recompiling the program...
    Resource strings 作为资源被保存,并被连接到可执行文件和库文件,因此它们能在程序不重新编译的情况下被修改。好处:方便软件发布的国际化。相同的软件携带不同的资源文件就可以了。
    题外话:你在Delphi中的showmessage(), messageBox()... 按钮是'ok' 'cancel' ....标题是'confirm' 'warning' ... 怎么办?随便新建一个Appication, 打开C:\Program Files\Borland\Delphi6\Source\Vcl\Consts.pas,看见什么了:resourcestring,改成中文;
    编译生成consts.dcu,覆盖C:\Program Files\Borland\Delphi6\Lib\Consts.dcu。再showmessage()看看。