home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / PASCAL / MISCTI10.ZIP / TI230.ASC < prev    next >
Encoding:
Text File  |  1988-04-18  |  2.5 KB  |  94 lines

  1. PRODUCT : TURBO PASCAL     NUMBER : 230
  2. VERSION : ALL
  3.      OS : PC-DOS, MS-DOS, CP/M-80, CP/M-86
  4.    DATE : April 8, 1986
  5.  
  6.   TITLE : MICROCALC MODIFICATIONS
  7.  
  8. The following are modifications to be made to MicroCalc.  If  you 
  9. are  using CP/M-80,  the section of code to modify is module  MC-
  10. MOD04.INC.  For all other implementations, the code is located in 
  11.  
  12. Bring up the appropriate module into the Turbo Pascal editor, and 
  13. locate the following csegments of code.  The lines to change  are 
  14. marked as {version 2.00 modified}
  15.   
  16. Modification 1:
  17.  
  18.   end else
  19.   if Ch='(' then
  20.   begin
  21.     NextCh;
  22.     F:=Expression;
  23.     if Ch =')' then NextCh;      { Ver. 2.00 modified }
  24.   end else
  25.     if Ch in ['A'..'G'] then { Maybe a cell reference }
  26.     begin
  27.       EFX:=Ch;
  28.       NextCh;
  29.  
  30. Modification 2:
  31.  
  32.         if Ch in Numbers then
  33.         begin
  34.           EXY:=EXY+Ch;
  35.           NextCh;
  36.         end;
  37.         if Ch = ')' then NextCh;                { Ver. 2.00
  38. Addition }
  39.         Val(EXY,EFY,ErrPos);
  40.         IsFormula:=true;
  41.         if (Constant in Sheet[EFX,EFY].CellStatus) and
  42.           not (Calculated in Sheet[EFX,EFY].CellStatus) then
  43.         begin
  44.  
  45. Modification 3:
  46.  
  47.         F:=Sheet[SumFX,SumFY].Value;
  48.         Cellsum:=Cellsum+f;
  49.         f:=Cellsum;
  50.       end;
  51.     end
  52.   end;
  53. end else                            { Ver. 2.00 Modification }
  54.   if Ch = ')' then                  { Ver. 2.00 Addition     }
  55.   begin                             { Ver. 2.00 Addition     }
  56.     NextCh;                         { Ver. 2.00 Addition     }
  57.     Found := true;                  { Ver. 2.00 Addition     }
  58.   end;                              { Ver. 2.00 Addition     }
  59. end;
  60. end else
  61. begin
  62.   found:=false;
  63.   for sf:=fabs to ffact do
  64.     if not found then
  65.     begin
  66.     l:=Length(StandardFunctionNames[sf]);
  67.     if copy(Formula,Pos - 1,l)=StandardFunctionNames[sf] then
  68.                                        { Ver. 2.00 Modification }
  69.     begin
  70.       Pos:=Pos+l-1; NextCh;
  71.       F:= Expression;                   { Ver. 2.00 Modification
  72. }
  73.       case sf of
  74.         fabs:     f:=abs(f);
  75.         fsqrt:    f:=sqrt(f);
  76.         fsqr:     f:=sqr(f);
  77.         fsin:     f:=sin(f);
  78.         fcos:     f:=cos(f);
  79.  
  80. Modification 4:
  81.  
  82.               ffact:    f:=fact(trunc(f));
  83.             end;
  84.             Found:=true;
  85.           end;
  86.         end;
  87.         if not Found then ErrPos:=Pos;
  88.       end;
  89.     end; { End if Ch in ['A'..'G'] }        { Ver. 2.00 Addition    
  90. }
  91.     Factor:=F;
  92.   end { function Factor};
  93.  
  94.