Janilabo

Janilabo | NegativeE() [SCAR Divi]

May 8th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.53 KB | None | 0 0
  1. {==============================================================================]  
  2.   Explanation: Returns the negative number of e. -999.9 to -999.9 OR 999.9 to -999.9 (+/- => -)                
  3. [==============================================================================}
  4. function NegativeE(e: Extended): Extended;
  5. begin
  6.   Result := (Abs(e) * -1);
  7. end;
  8.  
  9.  
  10. var
  11.   x: Extended;
  12.  
  13. begin
  14.   ClearDebug;
  15.   WriteLn(NegativeE(x));
  16.   x := -123.456;
  17.   WriteLn(NegativeE(x));
  18.   x := (x + 500.987);
  19.   WriteLn(NegativeE(x));
  20. end.
Advertisement
Add Comment
Please, Sign In to add comment