久久ER99热精品一区二区-久久精品99国产精品日本-久久精品免费一区二区三区-久久综合九色综合欧美狠狠

新聞中心

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

wincc中使用vbs常用函數

作者: 時間:2011-06-23 來源:網絡 收藏
28.second()

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

  功能:返回一個整數值.

  格式:second(time)

  參數:time是一個有效的時間表達式;

  例子lt;% =second(# 12:28:30#) %>

  結果:30

  29.strReverse()

  功能:返回與原字符串排列逆向的字符串.

  格式:strreverse(string)

  參數:string是字符串

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

  結果:!tset a si siht

  30.time()

  功能:返回當前系統的時間值.

  格式:time()

  參數:無

  結果:9:58:28 Am

  31.函數trim()

  功能:刪去字符串前,后的空格.

  格式:trim(string)

  參數:string 字符串.

  例子:

  %

  strtest=“ this is a test! ”

  response.write trim(strtest)

  %>

  結果:this is a test!

  32.函數UBound()

  功能:返回一個數組的上界.

  格式:Ubound(expression_r [,dimension])

  參數:expression_r 是數組表達式/數組變量,dimension 是任意項

  例子:

  %

  i = array(“1”,”2”,”3”)

  response.write ubound(i)

  %>

  結果: 2

  33.函數:UCase()

  功能:將一字符類型變量的字符全部變換成大寫字符.

  格式:Ucase(string)

  參數:string是字符串變量

  例子:

  %

  str=“THIS is Lcase!”

  response.write Lcase(str)

  %>

  結果:THIS IS LCASE!

  34.函數Vartype()

  功能:返回變量的常量代碼(整數)

  格式:Vartype(varname)

  參數:varname是任何類型的變量名稱.

  例子:

  %

  i=5

  response.write vartype(i)

  %>

  結果:2 (2表示整數,須要參考ASP常量代碼.)

  35.函數Weekday()

  功能:返回一個整數,對應一周中的第幾天.

  格式:Weekday(date [,firstofweek])

  參數: date為日期變量,firstofweek為任選項.

  例子:

  %

  d= # 5/9/00 #

  response.write weekday(d) %>

  結果:3(3 表示是星期二)

  36.函數weekdayname()

  功能:返回字符串,對應星期幾.

  格式:weekdayname(weekday[,abb[,firstdayofweek]])

  參數:weekday為日期變量,abb,firstdayofweek為任選項.

  例子:

  %

  d = #8/4/99#

  response.write weekdayname(d)

  %>

  結果: Wednesday

  37.函數year()

  功能:返回日期表達式所在的年份.

  格式:year(date)

  參數: date是有效的日期表達式

  例子:

  % =year(#8/9/99#) %>

  結果:1999

  38.函數Mod()功能:取余數.

  例子:3 Mod 2

  結果:1


上一頁 1 2 3 4 下一頁

關鍵詞: 函數 常用 vbs 使用 wincc

評論


相關推薦

技術專區

關閉