~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to ide/fpcalc.pas

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{
2
 
    $Id: fpcalc.pas,v 1.14 2005/02/14 17:13:18 peter Exp $
3
2
    This file is part of the Free Pascal Integrated Development Environment
4
3
    Copyright (c) 1998 by Berczi Gabor
5
4
 
112
111
{$ifdef go32v2}
113
112
  dpmiexcp,
114
113
{$endif}
115
 
{$ifdef win32}
116
 
  signals,
117
 
{$endif}
 
114
{$ifdef windows}
 
115
 {$ifdef HasSignal}
 
116
    signals,
 
117
  {$endif}
 
118
{$endif windows}
118
119
  FPString,FPUtils,FPConst,WUtils;
119
120
 
120
121
const
372
373
                  '*', '/': R := R / 100;
373
374
                end;
374
375
              case _Operator of
375
 
                '^': SetDisplay(Power(Operand,R),false);
 
376
                '^': if (Operand = 0)and(R <= 0) then Error else SetDisplay(Power(Operand,R),false);
376
377
                '+': SetDisplay(Operand + R,false);
377
378
                '-': SetDisplay(Operand - R,false);
378
379
                '*': SetDisplay(Operand * R,false);
577
578
end;
578
579
 
579
580
end.
580
 
{
581
 
  $Log: fpcalc.pas,v $
582
 
  Revision 1.14  2005/02/14 17:13:18  peter
583
 
    * truncate log
584
 
 
585
 
}