Home WinSpy2 & SpyDrive2 ECFTP Eon Clash's Text File Monitor Resume Creation Suite EC LCD Editor XML Browser Lite TXMLParser for Delphi Treemap ECXML Parser for Lazarus pas2lua and lua for Delphi/FPC AVR GCC Deprecated Macros XMethods WSDL Browser Graphics 32 Image Editor Demo Using TPaintBox for annimations Maze Generation and Solving TSimpleMath JD Docking Components JDErrorLog JDImageButton Tile Joiner SDL, LUA, and Freepascal Game Engine Demo Simple Bezier Curve sample in Lazarus Recurisve Shadowmapping in FPC/Lazarus ATerm - ANSI Terminal Demo Simple Side Scroller Demo Source Generic Pascal Lua Library pLua (Lua wrapper for FPC, Lazarus, and Delphi) News Forums Jeremy's Resume Contact Us Bug Tracking JumpStart Game Engine Jeremy's Blog

TSimpleMath

Properties Overview:

  • CopyWrite - Shows the copy write for the component.
  • Formulas - Formulas is where all your formulas should be held (See example for a better idea).
  • Name - Component Name
  • ParamValues - This is where the values are held (See example for a better idea).
  • Tag - This is an integer value that is common to components.
  • Version - The components version.
  • Website - The creation companies web address.
  • OnTagLookup - This event fires when a Parameter is encountered. Its another way besides adding all values to the ParamValues Property to return a paramater.
Functions available:
  • - Subtract
  • + Add
  • * Multiply
  • / Divide
  • > If the right side is greater then return it, else return the left.
  • < If the right side is less then return it, else return the right.
  • % Return the percent value of the number (EX: 50% will return 0.5).
  • d The d operative is used for dice formulas (EX: 2d5 returns a range of 2 to 10).
    Note: When using the d operative with other functions make sure and use parenthesis with it. Modify example program for a better understanding why.
    Note2: You cannot have a variable named "d" or "D".
  • # The # operative will truncate a number at its decimal point and return only the integer portion of the number.
  • () Parenthesis should be well utilized, as the RPN conversion math is still a little buggy at times.

Final Notes and Distribution Instructions:
This component should be "Thread Safe" but you are using it at your own risk. If you use this component in a publicly distributed application please let me know, I'd love to put it on my site.

Click here to download
Text Link Ads