OpTaliX包含允许自定义分析和计算的宏语言。
宏语言包含以下的几点:
使用算术表达式,在任何地点,数值的项目都是预期的。
Examples:
可以检索程序的内部数据库和能被重复使用的算术表达式,有权访问广泛范围的透镜参数和性能数据。
访问最常用的数学函数(sin, tan, cos, sinh, cosh, tanh, asin, acos, atan, sqrt, exp, log, log10, logn, besj0, besj1, besjn, abs, min, max, aint, anint)。
用户自定义变量和函数。
将参数传输给宏。
包含宏在其他的宏文件中和从基本的宏或指令中创建复杂的任务。
循环构造:DO – ENDDO
有条件的构造:IF - ELSE - ELSEIF – ENDIF。
在OpTaliX中宏是一个序列,在文件中它是一个算术表达式,可以对数据库项目进行存储。在整个程序中,宏功能都可使用。例如,在命令行中,优化函数的定义和自定义的图像。从指令或者GUI模式中运行宏。
sin(r) | sine of angle in radians |
cos(r) | cosine of angle in radians |
tan(r) | tangent of angle in radians |
exp(x) | ex |
log(x) | natural logarithm |
log10(x) | common logarithm |
logn(n,x) | logarithm base n |
sqrt(x) | square root |
acos(r) | arccosine |
asin(r) | arcsine |
atan(r) | arctangent |
cosh(r) | hyperbolic cosine |
sinh(r) | hyperbolic sine |
tanh(r) | hyperbolic tangent |
besj0(r) | Bessel function 1st kind, order 0 |
besj1(r) | Bessel function 1st kind, order 1 |
besjn(n,x) | Bessel function 1st kind, order n |
aint(x) | truncate to a whole number |
anint(x) | real representation of the nearest whole number |
abs(x) | absolute value |
min(a,b) | minimum value |
max(a,b) | maximum value |