编译时出现错误Left side cannot be assigned to 在线等

suifengjz 2010-03-10 03:39:44
软件是从网上下载的
这是下载地址http://dl8.winu.cn/control/2003100921363623735.rar
编译时出现
[错误] HexEditor.pas(1727): Left side cannot be assigned to
[错误] HexEditor.pas(1758): Left side cannot be assigned to
[致命错误] sample1.pas(7): Could not compile used unit 'HexEditor.pas'
var
pTP : TLongPoint;

const
pCan: Boolean = True;
pClicked : Boolean = False;
begin
Result := Inherited SelectCell ( aCol , aRow );

if (Result and fVariableLineLength and OutOfBounds ( aCol , aRow ))
then
Result := False;

if not pCan
then
Exit;
try
pCan := false;//[color=#FF0000]出现错误[color=#FF0000]
if Result
then begin
// 黚erpr黤en, ob linke maustaste oder shift gedr點kt, sonst selection zur點ksetzen
if not (IsKeyDown ( VK_SHIFT) or IsKeyDown ( VK_LBUTTON) )
then
ResetSelection ( True );

// 黚erpr黤en, ob au遝rhalb der DateiGr鲞e
if GetPosAtCursor ( aCol , aRow ) >= DataSize
then begin
GetPosAtCursor ( Col , Row );
pTP := GetCursorAtPos ( DataSize - 1 , fPosInChars );
MoveColRow ( pTP.x , pTP.y , True , True );
Result := False;
end
else
if aCol = (2 + fBPL2 )
then begin
Result := False;
if IsKeyDown ( VK_LBUTTON )
then begin
aCol := aCol -1;
aCol := Max ( 2 , aCol );
MoveColRow ( aCol , aRow , True , True );
Exit;
end;
end;

end;
finally
pCan := True;//[color=#FF0000]出现错误[color=#FF0000]
end;

end;
...全文
875 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
zz1001 2010-03-22
  • 打赏
  • 举报
回复
还是大力支持楼主解题!
[Quote=引用 5 楼 eriato 的回复:]
pCan的声明不用const,改用var
const传的是值,是不变的,var传的才是可变的
[/Quote]
静远 2010-03-10
  • 打赏
  • 举报
回复
pCan的声明不用const,改用var
const传的是值,是不变的,var传的才是可变的
火龙岛主 2010-03-10
  • 打赏
  • 举报
回复
左侧不能赋值
var
pTP : TLongPoint;

pCan: Boolean ;
pClicked : Boolean = False;
begin
pCan := True;
Result := Inherited SelectCell ( aCol , aRow );

if (Result and fVariableLineLength and OutOfBounds ( aCol , aRow ))
then
Result := False;

if not pCan
then
Exit;
try
pCan := false;//[color=#FF0000]出现错误[color=#FF0000]
if Result
then begin
// 黚erpr黤en, ob linke maustaste oder shift gedr點kt, sonst selection zur點ksetzen
if not (IsKeyDown ( VK_SHIFT) or IsKeyDown ( VK_LBUTTON) )
then
ResetSelection ( True );

// 黚erpr黤en, ob au遝rhalb der DateiGr鲞e
if GetPosAtCursor ( aCol , aRow ) >= DataSize
then begin
GetPosAtCursor ( Col , Row );
pTP := GetCursorAtPos ( DataSize - 1 , fPosInChars );
MoveColRow ( pTP.x , pTP.y , True , True );
Result := False;
end
else
if aCol = (2 + fBPL2 )
then begin
Result := False;
if IsKeyDown ( VK_LBUTTON )
then begin
aCol := aCol -1;
aCol := Max ( 2 , aCol );
MoveColRow ( aCol , aRow , True , True );
Exit;
end;
end;

end;
finally
pCan := True;//[color=#FF0000]出现错误[color=#FF0000]
end;

end;
林石公 2010-03-10
  • 打赏
  • 举报
回复

const
pCan: Boolean = True;
这一句前加上
{J+}


{J+}
const
pCan: Boolean = True;
再试试
bewild 2010-03-10
  • 打赏
  • 举报
回复
pCan是Const,不能赋值
完全同意楼上的
gzmhero 2010-03-10
  • 打赏
  • 举报
回复
pCan是Const,不能赋值

16,748

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 语言基础/算法/系统设计
社区管理员
  • 语言基础/算法/系统设计社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧