delphi 'Char' and 'AnsiChar'报错问题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了delphi 'Char' and 'AnsiChar'报错问题相关的知识,希望对你有一定的参考价值。
[DCC Error] 自动关机.pas(51): E2010 Incompatible types: 'Char' and 'AnsiChar' 这个报错貌似在 delphi7里面是不会报错的吧?请问能不能详细的告诉我一下 这个错误的解决办法?Char 和 AnsiChar 怎么变成了不同类型呢 要用函数转换吗?
你用的什么啊!如果不是d7那你只能全部声明为AnsiChar了,高版本delphi Char默认是WideChar 参考技术A Delphi中有PChar, PWideChar, pAnsiChar三种形式
在 Delphi2010 之前,默认PChar是PAnsiChar,之后默认都是 PWideChar
如果你当前版本报错,你就要具体指定是PAnsiChar或者是pWideChar了
Difference between Char.IsDigit() and Char.IsNumber() in C#
Char.IsDigit()
is a subset of Char.IsNumber()
.
Some of the characters that are ‘numeric‘ but not digits include 0x00b2 and 0x00b3 which are superscripted 2 and 3 (‘²‘ and ‘³‘) and the glyphs that are fractions such as ‘¼‘, ‘½‘, and ‘¾‘.
Note that there are quite a few characters that IsDigit()
returns true
for that are not in the ASCII range of 0x30 to 0x39, such as these Thai digit characters: ‘?‘ ‘?‘ ‘?‘ ‘?‘ ‘?‘ ‘?‘ ‘?‘ ‘?‘ ‘?‘ ‘?‘.
This snippet of code tells you which code points differ:
static private void test() { for (int i = 0; i <= 0xffff; ++i) { char c = (char) i; if (Char.IsDigit( c) != Char.IsNumber( c)) { Console.WriteLine( "Char value {0:x} IsDigit() = {1}, IsNumber() = {2}", i, Char.IsDigit( c), Char.IsNumber( c)); } } }
以上是关于delphi 'Char' and 'AnsiChar'报错问题的主要内容,如果未能解决你的问题,请参考以下文章
不修改系统日期和时间格式,解决Delphi报错提示 '****-**-**'is not a valid date and time