Lazarus中文社区

 找回密码
 立即注册(注册审核可向QQ群索取)

QQ登录

只需一步,快速开始

Lazarus IDE and 组件 下载地址版权申明
查看: 2806|回复: 1

公式解析计算组件

[复制链接]

该用户从未签到

发表于 2013-2-6 05:49:17 | 显示全部楼层 |阅读模式
因为需要,在http://www.lazarus.freepascal.org/上查到的。组件网址http://artsoft.nm.ru/download.html

ArtFormula
package contains two nonvisual Delphi and Lazarus componenst for symbolic expression parsing and evaluation. Provides runtime scripting engine for automating your programs.

Provides:

  • 7 arithmetic operations
  • 10 logical operations
  • 6 bitwise operations
  • string concatenation (@) and like (==) operator
  • 24 arithmetic functions
  • 10 statistical functions
  • 2 logical functions
  • 17 string functions
  • 13 date functions
  • 14 programming functions
  • User defined constant
  • User defined variables
  • User defined functions (modules)
  • Subroutines, global vars and constants
  • Symbolical differentiation of functions with basic simplification of resulting derivatives

Arithmetic operation:
x + y, x - y, x * y, x / y, x % y (Mod), x ^ y (power), x\ y (Div)

Logical operation (true=1, false=0):
x > y, x < y, x >= y, x <= y, x = y, x <> y, ! x (not), x & y (and), x | y (or), x xor y

Bitwise operations:
x && y (band), x || y (bor), !!x (bnot), x bxor y, x >> y (shr), x << y (shl)

Predefined constants:
Pi = 3.1415926535897932385
True = 1
False = 0

Functions:
sin, cos, tan, sinh, cosh, tanh, asin, acos, atan, asinh, acosh, atanh, sqrt, exp, log, lg (log base 10), int (integer part of a number), frac (fractional part of a number), abs, sign, rnd, randomize, trunc (truncates value to a specified number of digits), round (rounds value to a specified number of digits)
max(x,y...), min(x,y,...), count(x,y,...), sum(x,y,...), sumofsquares(x,y,...), avg(x,y,...), variance(x,y,...), variancep(x,y,...), stddev(x,y,...), stddevp(x,y,...)
iff(cond,x,y) (if cond = true then result = x else result = y),
isnumber(x)
chr(x), length(s), trim(s), trimleft(s), trimright(s) lowercase(s), uppercase(s), midstr(s,x,y), leftstr(s,x), rightstr(s,x), pos(s,t), code(s), format(s,x), formatf(s,x), stringofchar(c,n), concat(s1,s2,...), hex(s)
date(s), now, formatdate(s,d), year(d), month(d), day(d), hour(d), minute(d), second(d), millisecond(d), isleapyear(n), dayofweek(d), encodedate(y,m,d)

Programming:

TArtFormula provides two styles of programming: formula style and scripting style. The first style assumes that all statements have the form of function call. The second style imply that you use common program language notation.

回复

使用道具 举报

该用户从未签到

发表于 2013-2-24 21:57:01 | 显示全部楼层
不错!
回复 支持 反对

使用道具 举报

*滑块验证:

本版积分规则

QQ|手机版|小黑屋|Lazarus中国|Lazarus中文社区 ( 鄂ICP备16006501号-1 )

GMT+8, 2025-5-2 21:06 , Processed in 0.028957 second(s), 11 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表