<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>

新聞中心

EEPW首頁(yè) > 嵌入式系統 > 設計應用 > wincc中使用vbs常用函數

wincc中使用vbs常用函數

作者: 時(shí)間:2011-06-23 來(lái)源:網(wǎng)絡(luò ) 收藏
15.left()

本文引用地址:http://dyxdggzs.com/article/150569.htm

  功能:截取一個(gè)字符串的前部分;

  格式:left(string,length)

  參數:string字符串,length截取的長(cháng)度.

  例子: % =left(“this is a test!”,6) %>

  結果:this i

  16.len()

  功能:返回字符串長(cháng)度或者變量的字節長(cháng)度

  格式:len(string *varname)

  參數:string字符串;varname任意的變量名稱(chēng)

  例子:

  %

  strtest=“this is a test!”

  response.write left(strtest)

  %>

  結果:15

  17.ltrim()

  功能:去掉字符串前的空格.

  格式:ltrim(string)

  參數:string 字符串.

  例子: % =ltrim (“ this is a test!”)

  結果:this is a test!

  18.函數Mid()

  功能:從字符串中截取字符串.

  格式:mid(string,start [,length])

  參數:string字符串,start截取的起點(diǎn),length要截取的長(cháng)度.

  例子:

  %

  strtest=“this is a test, Today is Monday!”

  response.write mid(strtest,17,5)

  %>

  結果:Today

  19.函數minute()

  功能:返回一數值, 表示分鐘

  格式:minute(time)

  參數: time是時(shí)間變量

  例子lt;% =minute(#12:23:34#) %>

  結果:23

  20.函數month()

  功能:返回一數值, 表示月份

  格式:month(time)

  參數:time是日期變量

  例子% =month(#08/09/99) %>

  結果:9

  [color=#1E90FF]21.函數monthname()[/color]

  功能:返回月份的字符串(名稱(chēng)).

  格式:Monthname(date [,abb])

  參數: date是日期變量,abb=true時(shí) 則月份的縮寫(xiě),

  例子:

  % =monthname(#4/5/99#) %>

  結果:April

  22.函數Now()

  功能:返回系統的當前時(shí)間和日期.

  格式:now()

  參數:無(wú)

  例子:

  % =now() %>

  結果: 05/10/00 8:45:32 pm

  25.函數rnd()

  功能:返回一個(gè)隨機數值

  格式:rnd[(number)]

  參數:number是任意數值.

  例子:

  %

  randomize()

  response.write rnd()

  %>

  結果:0/1數值之一,無(wú)randomize(), 則不能產(chǎn)生隨機數.

  26.函數round()

  功能:完整數值

  格式:round(expression_r[,numright])

  參數:expression_r數字表達式;numright任意選項.

  例子:

  %

  i=12.33654

  response.write round(i)

  %>

  結果: 12

  27.函數rtrim()

  功能:去掉字符串后的空格.

  格式:rtrim(string)

  參數:string 是字符串

  例子:

  %

  response.write rtrim(“this is a test! ”)

  %>

  結果:this is a test!

  23.函數:replace()

  功能:在字符串中查找,替代指定的字符串.

  格式:replace(strtobesearched,strsearchfor,strreplacewith [,start[,count[,compare]]])

  參數:strtobesearched是字符串; strsearchfor是被查找的子字符串;strreplacewith 是用來(lái)替代的子字符串.start,count,compare 是任意選項.

  例子:

  %

  strtest=“this is an apple.”

  response.write replace(strtest,”apple”,”orange”)

  %>

  結果:this is an orange.

  24.函數right()

  功能:截取一個(gè)字符串的后部分

  格式:right(string,length)

  參數:string字符串,length截取的長(cháng)度.

  例子:

  %

  strtest=“this is a test!”

  response.write right(strtest,3)

  %>

  結果:st!



關(guān)鍵詞: 函數 常用 vbs 使用 wincc

評論


相關(guān)推薦

技術(shù)專(zhuān)區

關(guān)閉
国产精品自在自线亚洲|国产精品无圣光一区二区|国产日产欧洲无码视频|久久久一本精品99久久K精品66|欧美人与动牲交片免费播放
<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>