if ReadString('1Pop3','ServerName','pop3.server.com')=''
的编译出了问题:
Operator not applicable to this operand type
大概是算符与操作数不一致出了问题。
的编译出了问题:
Operator not applicable to this operand type
大概是算符与操作数不一致出了问题。
解决方案 »
- delphi中可以有私有构造函数吗?
- 子窗体释放后程序主窗口不能获得焦点,程序暂停,怎么解决? (急急急)
- 我用右键单击复制一个文件到另外一个地方,怎么获得源地址和目标地址?
- 为什么我添加的Outlookbar控件不能用!
- 100分求教如何cancle掉耗时查询?(在线等待)
- delphi表格数据保存时老报“update failed.found 4 records”等错误
- 招聘Delphi程序员 (广东东莞)
- adoquery的问题
- 如何实现用delphi播放mtv?
- 使用ActiveMovie控件播放时怎样使画面全屏?
- 关于delphi7调用oracle存储过程的错误,求教高手解决!
- TQuickRep怎么设置为横打?
var
SQLServerName ,SQLDBName ,Password :string
tempIni: TIniFile;
begin
tempIni :=TIniFile.Create(extractfilepath(ParamStr(0))+'sys.ini');
SQLServerName := tempIni.ReadString('SYSTEM', 'SERVER', '');
SQLDBName := tempIni.ReadString('SYSTEM', 'DBNAME', '');
Password := BlowfishDecrypt(tempIni.ReadString('SYSTEM', 'Password',''));
tempIni.Free;
end;
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, IniFiles,Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Edit2: TEdit;
Label3: TLabel;
Edit3: TEdit;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Label4: TLabel;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;
n:integer;
implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
var
MailIni:TIniFile;
begin
MailIni:=TIniFile.Create(ExtractFilePath(ParamStr(0))+'Mail.ini');
with MailIni do begin
if ReadString('1Pop3','ServerName','pop3.server.com')='' or ReadString('1Pop3','ServerUser','your_login')='' ReadeString('1Pop3','ServerPassword','your_password')='' then n=1
else if ReadString('2Pop3','ServerName','pop3.server.com')='' or ReadString('2Pop3','ServerUser','your_login')='' ReadString('2Pop3','ServerPassword','your_password')='' then n=2
else if ReadString('3Pop3','ServerName','pop3.server.com')='' or ReadString('3Pop3','ServerUser','your_login')='' ReadString('3Pop3','ServerPassword','your_password')='' then n=3
else if ReadString('4Pop3','ServerName','pop3.server.com')='' or ReadString('4Pop3','ServerUser','your_login')='' ReadString('4Pop3','ServerPassword','your_password')='' then n=4
else if ReadString('5Pop3','ServerName','pop3.server.com')='' or ReadString('5Pop3','ServerUser','your_login')='' ReadString('5Pop3','ServerPassword','your_password')='' then n=5
else if ReadString('6Pop3','ServerName','pop3.server.com')='' or ReadString('6Pop3','ServerUser','your_login')='' ReadString('6Pop3','ServerPassword','your_password')='' then n=6
else if ReadString('7Pop3','ServerName','pop3.server.com')='' or ReadString('7Pop3','ServerUser','your_login')='' ReadString('7Pop3','ServerPassword','your_password')='' then n=7
else if ReadString('8Pop3','ServerName','pop3.server.com')='' or ReadString('8Pop3','ServerUser','your_login')='' ReadString('8Pop3','ServerPassword','your_password')='' then n=8
else if ReadString('9Pop3','ServerName','pop3.server.com')='' or ReadString('9Pop3','ServerUser','your_login')='' ReadString('9Pop3','ServerPassword','your_password')='' then n=9
else if ReadString('10Pop3','ServerName','pop3.server.com')='' or ReadString('10Pop3','ServerUser','your_login')='' ReadString('10Pop3','ServerPassword','your_password')='' then n=10
else if ReadString('11Pop3','ServerName','pop3.server.com')='' or ReadString('11Pop3','ServerUser','your_login')='' ReadString('11Pop3','ServerPassword','your_password')='' then n=11
else if ReadString('12Pop3','ServerName','pop3.server.com')='' or ReadString('12Pop3','ServerUser','your_login')='' ReadString('12Pop3','ServerPassword','your_password')='' then n=12
else if ReadString('13Pop3','ServerName','pop3.server.com')='' or ReadString('13Pop3','ServerUser','your_login')='' ReadString('13Pop3','ServerPassword','your_password')='' then n=13
else if ReadString('14Pop3','ServerName','pop3.server.com')='' or ReadString('14Pop3','ServerUser','your_login')='' ReadString('14Pop3','ServerPassword','your_password')='' then n=14
else if ReadString('15Pop3','ServerName','pop3.server.com')='' or ReadString('15Pop3','ServerUser','your_login')='' ReadString('15Pop3','ServerPassword','your_password')='' then n=15
else if ReadString('16Pop3','ServerName','pop3.server.com')='' or ReadString('16Pop3','ServerUser','your_login')='' ReadString('16Pop3','ServerPassword','your_password')='' then n=16
else if ReadString('17Pop3','ServerName','pop3.server.com')='' or ReadString('17Pop3','ServerUser','your_login')='' ReadString('17Pop3','ServerPassword','your_password')='' then n=17
else if ReadString('18Pop3','ServerName','pop3.server.com')='' or ReadString('18Pop3','ServerUser','your_login')='' ReadString('18Pop3','ServerPassword','your_password')='' then n=18
else if ReadString('19Pop3','ServerName','pop3.server.com')='' or ReadString('19Pop3','ServerUser','your_login')='' ReadString('19Pop3','ServerPassword','your_password')='' then n=19
else if ReadString('20Pop3','ServerName','pop3.server.com')='' or ReadString('20Pop3','ServerUser','your_login')='' ReadString('20Pop3','ServerPassword','your_password')='' then n=20
else n=21;
end;
Label4.Caption:='第'n'页';
end;end.
错误提示是这样:
[Error] Unit1.pas(41): Operator not applicable to this operand type
[Error] Unit1.pas(42): Operator not applicable to this operand type
[Error] Unit1.pas(43): Operator not applicable to this operand type
[Error] Unit1.pas(44): Operator not applicable to this operand type
[Error] Unit1.pas(45): Operator not applicable to this operand type
[Error] Unit1.pas(46): Operator not applicable to this operand type
[Error] Unit1.pas(47): Operator not applicable to this operand type
[Error] Unit1.pas(48): Operator not applicable to this operand type
[Error] Unit1.pas(49): Operator not applicable to this operand type
[Error] Unit1.pas(50): Operator not applicable to this operand type
[Error] Unit1.pas(51): Operator not applicable to this operand type
[Error] Unit1.pas(52): Operator not applicable to this operand type
[Error] Unit1.pas(53): Operator not applicable to this operand type
[Error] Unit1.pas(54): Operator not applicable to this operand type
[Error] Unit1.pas(55): Operator not applicable to this operand type
[Error] Unit1.pas(56): Operator not applicable to this operand type
[Error] Unit1.pas(57): Operator not applicable to this operand type
[Error] Unit1.pas(58): Operator not applicable to this operand type
[Error] Unit1.pas(59): Operator not applicable to this operand type
[Error] Unit1.pas(60): Operator not applicable to this operand type
[Error] Unit1.pas(68): Statement expected but end of file found
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
if (ReadString('1Pop3','ServerName','pop3.server.com')='') or (ReadString('1Pop3','ServerUser','your_login')='') 这里少了 or ReadeString('1Pop3','ServerPassword','your_password')='' then n:=1-_-!!!
if MailIni.ReadString('1Pop3','ServerName','pop3.server.com')='' then
showmessage('读取ini文件,前面加上ini.readstring()');
{或者是}
with MailIni do
begin
{你的操作!}
end;
with MailIni do
begin
for n := 1 to 20 do
if (ReadString(IntToStr(n)+'Pop3','ServerName','pop3.server.com') = '') or (ReadString(IntToStr(n)+'Pop3','ServerUser','your_login')='') or (ReadString(IntToStr(n)+'Pop3','ServerPassword','your_password')='') then break;
end
Label4.Caption:='第'+IntToStr(n)+'页';
if条件语句中,如果是多条件组合,要用括号
if (条件1) or (条件2) or (条件3) then
beginend;