VBS,JAVA,ORACLE相关语言特性整理

序号特性说明VBSJAVAORACLE待续
1逻辑判断ifif  statement then
elseif statement then
if statement then
else if statement then
else
if statement then
elseif statement then
end if
可见脚本语言vbs,oracle语法一致,java则是不同它们
2绝对值计算abs(数字)abs(数字)abd(数字) 
 数字的平方根sqr(数字)Math.sqrt(double)sqrt(数字) 
 取整函数,返回小于numint(数字)/fix(数字)ceil(),floor()ceil(),floor() 
 数字格式转换formatnumber(number,小数保留位数,是否显示小数前0,负数用括号显示)numberformant抽象类,子类实例化trunc()
round()
 
 日期格式转换formatdate(date,pattern)simpledateformattrunc() 
 随机数1-6 int(6*rnd()+1) dbms_random.value(1,n) 
 四舍五入round(number,num),
formatnumber支持不补零
 round(数字,位数),trunc(数字,位数)他不会四舍五入 
 数组的最大下标ubound(数组名).length-1 
 数组的最小下标lbound(数组名)0 
 数组声明dim a
a=array(1,2,3,5)或者
dim a(10)
int a[]={};
int a[]=new int[15];
 
 数组数据过滤filter(数组名,搜索的字符串)返回一个过滤过的数组 
 数组转换为字符串join(array,patt)string.toarrray() char[]类型 
 数组的大小ubound(数组名)-lbound(数组名)+1.length 
 变量转换为整数类型cint()intto_number(字符串),带有格式的字符串 
 变量转换为长整数类型clng()longto_number(字符串),带有格式的字符串 
 变量转换为single类型csng()floatto_number(字符串),带有格式的字符串 
 变量转换为double类型cdbl()doubleto_number(字符串),带有格式的字符串 
 变量转换为字符串cstr()tostringto_char() 
 变量转换为日期cdate()dateformat.parse()to_date() 
 变量转换为字节cbyte().   
 变量转换为布尔类型cbool()   
 返回数字正负0值sgnsign()  
 十六进制八进制hex,oct   
 ANSI 字符代码chr(数字),asc(字符)   
 时间timer,time,date(),now()   
 时间截取year(),month(),day(),weekday(),hour(),minute(),second()///datepart()   
 月份,星期字符串monthname(),weekdayname()   
 日期相加dateadd(类型,正数,日期)   
 两个时间段的间隔datediff类型,日期1,日期2)   
 指定的年、月、日,返回 Date 子类型的 Variantdateserial(year,monthk,day)表达式   
 字符串智能转换为date,timeDateValue、TimeValue   
 计算时间,毫秒timer()   
 大小写字符串函数lcase,ucase   
 去除字符串前后空格ltrim,rtrim,trim()   
 子字符串索引--》字符串right,left,mid   
 字符串的长度len()   
 字符串替代函数replace(str,restr,wanted)   
 分割字符串为一维数组split(str,pattern)   
 字符串文本二进制比较strcomp()   
 子字符串--》索引,判断字符串存在instr(str,str2,pattern)
instrrev(str,str2,pattern)
   
 

返回具有指定长度的、重复字符组成的字符串。

字符也可以是字符代码,如果字符有好几个,则由第一个来重复组成返回的字符串
string(10,”*”)   
 字符串颠倒strreverse(str)   
 指定数目的空格space(数字)   
 判断类型和获取类型信息的函数IsArray、IsDate、IsEmpty、IsNull、IsNumeric、IsObject,typename,vartype()   
 四个格式化函数formatcurrency,formatnumber,formatdatetime,formatpercent()   
 脚本版本函数返回脚本语言(VBScript), 返回脚本引擎版本(8832), 返回脚本引擎主版本号(5), 返回脚本引擎次版本号ScriptEngine ,ScriptEngineBuildVersion,ScriptEngineMajorVersion,ScriptEngineMinorVersion   
 设置当前的区域GetLocale,SetLocale   
      
      
      
      
      
      
      
      
      
      
      
      
      
      

转载于:https://www.cnblogs.com/alterhu/archive/2012/03/17/2402810.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值