--------开始-------- 对于不同类型的数据对应的绝对值函数也不相同,在c和c++中分别在头文件math.h 和 cmath 中. int : x = abs( n ) double : x = fabs( n ) long : x = labs( n ) --------结束--------
1.绝对值:abs() select abs(-2) value from dual; 2.取整函数(大):ceil() select ceil(-2.001) value from dual;(-2) 3.取整函数(小):floor() select floor(-2.001) value from dual;(-3) 4.取整函数(截取):trunc() select trunc(-2.001) value from dual; (-2) 5.四舍五入:round() select roun
smarty基本语法: 1.注释:<{* this is a comment *}>,注意左右分隔符的写法,要和自己定义的一致. <{* I am a Smarty comment, I don't exist in the compiled output *}><!--里面的内容是注释的,不会显示在页面中--> 2.变量:模板变量用美元符号$开始,可以包含数字.字母和下划线,这与php变量很像.可以引用数组的数字或非数字索引,当然也可以引用对象属性和方法. <{