浏览代码

* renamed sqr to sqrt, fixes 7278

git-svn-id: trunk@4513 -
florian 19 年之前
父节点
当前提交
f1cfe61d6e
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      ide/fpcalc.pas

+ 3 - 3
ide/fpcalc.pas

@@ -308,7 +308,7 @@ begin
     {          Status := csValid;}
     {          Status := csValid;}
               GetDisplay(R);
               GetDisplay(R);
               if Key='1/X' then begin if R=0 then Error else SetDisplay(1/R,false) end else
               if Key='1/X' then begin if R=0 then Error else SetDisplay(1/R,false) end else
-              if Key='SQR' then begin if R<0 then Error else SetDisplay(sqrt(R),false) end else
+              if Key='SQRT' then begin if R<0 then Error else SetDisplay(sqrt(R),false) end else
               if Key='LOG' then begin if R<=0 then Error else SetDisplay(ln(R),false) end else
               if Key='LOG' then begin if R<=0 then Error else SetDisplay(ln(R),false) end else
               if Key='X^2' then SetDisplay(R*R,false) else
               if Key='X^2' then SetDisplay(R*R,false) else
               if Key='M+' then Memory:=Memory+R else
               if Key='M+' then Memory:=Memory+R else
@@ -464,11 +464,11 @@ end;
 
 
 constructor TCalculator.Init;
 constructor TCalculator.Init;
 const
 const
-  Keys: array[0..29] of string[3] =
+  Keys: array[0..29] of string[4] =
    ('M+',  'x^y','C'  ,#27  ,'%'  ,#241 ,
    ('M+',  'x^y','C'  ,#27  ,'%'  ,#241 ,
     'M-',  'x^2','7'  ,'8'  ,'9'  ,'/'  ,
     'M-',  'x^2','7'  ,'8'  ,'9'  ,'/'  ,
     'M'#26,'1/x','4'  ,'5'  ,'6'  ,'*'  ,
     'M'#26,'1/x','4'  ,'5'  ,'6'  ,'*'  ,
-    'M'#27,'sqr','1'  ,'2'  ,'3'  ,'-'  ,
+    'M'#27,'sqrt','1'  ,'2'  ,'3'  ,'-'  ,
     'M'#29,'log','0'  ,'.'  ,'='  ,'+'  );
     'M'#29,'log','0'  ,'.'  ,'='  ,'+'  );
 var
 var
   I: Integer;
   I: Integer;