濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > 好玩的vbs特色代碼vbs棧類(lèi)

好玩的vbs特色代碼vbs棧類(lèi)

熱門(mén)標(biāo)簽:外呼系統(tǒng)免費(fèi)招代理 怎么看地圖標(biāo)注 廣州ai電銷(xiāo)機(jī)器人一般多少錢(qián) 合肥高德地圖標(biāo)注 外呼線路中繼線是什么 外呼系統(tǒng)telrobot 百度地圖標(biāo)注是什么意思 深圳外呼系統(tǒng)收費(fèi) 拉薩外呼系統(tǒng)業(yè)務(wù)

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

'**********************************************
'        vbs棧類(lèi)
'        push(string)進(jìn)棧
'        getTop取棧頂元素
'        pop去掉棧頂元素
'        isempty是否???
'        isfull是否棧滿(mǎn)(pMax設(shè)置了大小,可自行修改)
'
'        木鳥(niǎo)  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

標(biāo)簽:臺(tái)灣 玉林 嘉興 六安 漳州 周口 延安 廣安

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《好玩的vbs特色代碼vbs棧類(lèi)》,本文關(guān)鍵詞  好玩,的,vbs,特色,代碼,棧類(lèi),;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《好玩的vbs特色代碼vbs棧類(lèi)》相關(guān)的同類(lèi)信息!
  • 本頁(yè)收集關(guān)于好玩的vbs特色代碼vbs棧類(lèi)的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    闻喜县| 仙桃市| 射洪县| 铁岭县| 西贡区| 疏附县| 金湖县| 霸州市| 浠水县| 安顺市| 桃园市| 淮阳县| 五家渠市| 布拖县| 浙江省| 万年县| 九龙坡区| 故城县| 诸暨市| 邻水| 沂源县| 潜江市| 香港 | 珠海市| 虎林市| 且末县| 西平县| 琼结县| 沂源县| 金川县| 会宁县| 霍城县| 河津市| 旌德县| 宁波市| 高邮市| 武定县| 漯河市| 宁国市| 剑阁县| 庆阳市|