欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網(wǎng)!

vb

當(dāng)前位置:主頁 > 軟件編程 > vb >

好玩的vbs特色代碼vbs棧類

來源:本站原創(chuàng)|時(shí)間:2020-01-10|欄目:vb|點(diǎn)擊: 次

數(shù)據(jù)結(jié)構(gòu)的問題相當(dāng)重要,如果你能描述出一個(gè)問題的輸入和輸出數(shù)據(jù)結(jié)構(gòu),那么這個(gè)問題就大有希望,數(shù)據(jù)結(jié)構(gòu)并不是C語言的專利,真正的數(shù)據(jù)結(jié)構(gòu)是偽代碼的。下面這個(gè)棧類是我以前搜集別人的代碼,實(shí)際上每當(dāng)考慮一個(gè)程序問題的時(shí)候,尤其是復(fù)雜的程序,就應(yīng)該想到,用什么樣的數(shù)據(jù)去描述你的輸入和輸出。

'**********************************************
'        vbs棧類
'        push(string)進(jìn)棧
'        getTop取棧頂元素
'        pop去掉棧頂元素
'        isempty是否棧空
'        isfull是否棧滿(pMax設(shè)置了大小,可自行修改)
'
'        木鳥  2002.10.10
'        http://www.aspsky.net/
'**********************************************

class Stack
        private pArr, pString, pMax
        private tab
        private sub class_initialize()
                tab=chr(9)
                pMax=1000        '最大容量
        end sub
        private sub class_terminate()
                if isarray(pArr) then
                        erase pArr
                end if
        end sub

        public function push(str)
                if str<>"" and instr(str,tab)<1 and not Isfull then
                        if isarray(pArr) then
                                pString=join(pArr,tab)
                        end if
                        pString=pString & tab & str
                        pArr=split(pString,tab)
                        push=true
                else
                        push=false
                end if
        end function

        public function GetTop()
                if not isarray(pArr)<0 then
                        GetTop=null
                else
                        if ubound(pArr)<0 then
                                GetTop=null
                        else
                                GetTop=pArr(Ubound(pArr))
                        end if
                end if
        end function

        public function Pop()
                if not isArray(pArr) then
                        Pop=false
                else
                        if Ubound(pArr)<0 then
                                Pop=false
                        else
                                pString=join(pArr,tab)
                                pString=left(pString,inStrRev(pString,tab)-1)
                                pArr=split(pString,tab)
                                Pop=true
                        end if
                end if
        end function

        public function Isempty()
                 if not isArray(pArr) then
                         Isempty=true
                 else
                         if Ubound(pArr)<0 then
                                 isempty=true
                         else
                                 isempty=false
                         end if
                 end if
        end function

        public function Isfull()
                if not isArray(pArr) then
                        Isfull=false
                else
                        if ubound(pArr)<pMax then
                                Isfull=false
                        else
                                Isfull=true
                        end if
                end if
        end function
end class

上一篇:VBS和頁面中響應(yīng)COM的事件的方法和代碼

欄    目:vb

下一篇:幾段非常有用的腳本(來自微軟網(wǎng)站,由downmoon精心收集)

本文標(biāo)題:好玩的vbs特色代碼vbs棧類

本文地址:http://mengdiqiu.com.cn/a1/vb/7946.html

網(wǎng)頁制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語言數(shù)據(jù)庫服務(wù)器

如果侵犯了您的權(quán)利,請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)進(jìn)行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有