⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 d3.htm

📁 对于学习很有帮助
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">

<HTML>
<HEAD>
	<TITLE>UDDF - Delphi 3</TITLE>
</HEAD>

<BODY>
<BODY LINK="#0000ff" VLINK="#800080" BGCOLOR="#ffffff">

<IMG SRC="../images/uddf.jpg">
<P><HR></P>
<FONT FACE="Arial Black" SIZE=7 COLOR="#ff0000"><P ALIGN="CENTER">Delphi 3 Migration</FONT> </P>

<H1><A NAME="d30">D3 LoadStr constants</A></H1>
<I>From: Stefan.Hoffmeister@UNI-Passau.DE (Stefan Hoffmeister)</I>

Have you been politically correct and raised exceptions with
Borland supplied text from CONSTS.PAS in Delphi 1 or Delphi 2?
For instance:<p>

<pre>   raise SomeException.Create(LoadStr(SInsertLineError));</pre>

This will no longer work. My suggested change is to use

<hr><pre>   raise SomeException.Create(
         {$IFNDEF VER100}LoadStr{$ENDIF}
                              (SInsertLineError)); </pre><hr>

which conditional on being compiled with Delphi 3 leaves out the
"LoadStr" which seems to have become obsolete *for this purpose*
now.<p>

In general all code making use of the constants declared in
CONSTS(.PAS/.DCU) will cause a compiler error: 
"Incompatible types: 'Integer' and 'String'" <p>

I have not found anything in Borland's printed or online
documentation to this effect.<p>

<HR SIZE="6" COLOR="LIME">
<FONT SIZE="2">
<a href="mailto:rdb@ktibv">Please email me</a> and tell me if you liked this page.<BR>
<SCRIPT LANGUAGE="JavaScript">
<!--
	document.write("Last modified " + document.lastModified);
// -->
</SCRIPT><P>
<TABLE BORDER=0 ALIGN="CENTER">
<TR>
	<TD>This page has been created with </TD>
	<TD> <A HREF="http://www.dexnet.com./homesite.html"><IMG SRC="../images/hs25ani.gif" WIDTH=88 HEIGHT=31 BORDER=0 ALT="HomeSite 2.5b">
</A></TD>
</TR>
</TABLE>

</FONT>


</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -