| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1002 人关注过本帖
标题:求助!!这段代码如何写成c++代码?拜谢了!!!
只看楼主 加入收藏
mazheng75
Rank: 1
等 级:新手上路
帖 子:20
专家分:0
注 册:2004-5-11
收藏
 问题点数:0 回复次数:3 
求助!!这段代码如何写成c++代码?拜谢了!!!
求助!!这段代码如何写成c++代码?拜谢了!!!

代码:
FUNCTION HTMLtoText($string) $OriginalCase = SETOPTION("CaseSensitivity", "ON") IF INSTR($string, "&") = 0 OR INSTR($string, ";") = 0 EXIT 2 ENDIF DIM $Counter DIM $CodeAlts[103] $CodeAlts[0] = "" $CodeAlts[1] = "&" $CodeAlts[2] = "&" $CodeAlts[3] = "&" $CodeAlts[4] = "&" $CodeAlts[5] = "&" $CodeAlts[6] = "&" $CodeAlts[7] = "&" $CodeAlts[8] = "&" $CodeAlts[9] = "&" $CodeAlts[10] = "&" $CodeAlts[11] = "&" $CodeAlts[12] = "&" $CodeAlts[13] = "&" $CodeAlts[14] = "&" $CodeAlts[15] = "&" $CodeAlts[16] = "&" $CodeAlts[17] = "&" $CodeAlts[18] = "&" $CodeAlts[19] = "&" $CodeAlts[20] = "&" $CodeAlts[21] = "&" $CodeAlts[22] = "&" $CodeAlts[23] = "&" $CodeAlts[24] = "²" $CodeAlts[25] = "³" $CodeAlts[26] = "&" $CodeAlts[27] = "&" $CodeAlts[28] = "&" $CodeAlts[29] = "&" $CodeAlts[30] = "&" $CodeAlts[31] = "¹" $CodeAlts[32] = "&" $CodeAlts[33] = "&" $CodeAlts[34] = "¼" $CodeAlts[35] = "½" $CodeAlts[36] = "¾" $CodeAlts[37] = "&" $CodeAlts[38] = "À" $CodeAlts[39] = "Á" $CodeAlts[40] = "Â" $CodeAlts[41] = "Ã" $CodeAlts[42] = "Ä" $CodeAlts[43] = "Å" $CodeAlts[44] = "Æ" $CodeAlts[45] = "Ç" $CodeAlts[46] = "È" $CodeAlts[47] = "É" $CodeAlts[48] = "Ê" $CodeAlts[49] = "Ë" $CodeAlts[50] = "Ì" $CodeAlts[51] = "Í" $CodeAlts[52] = "Î" $CodeAlts[53] = "Ï" $CodeAlts[54] = "&" $CodeAlts[55] = "Ñ" $CodeAlts[56] = "Ò" $CodeAlts[57] = "Ó" $CodeAlts[58] = "Ô" $CodeAlts[59] = "Õ" $CodeAlts[60] = "Ö" $CodeAlts[61] = "&" $CodeAlts[62] = "Ø" $CodeAlts[63] = "Ù" $CodeAlts[64] = "Ú" $CodeAlts[65] = "Û" $CodeAlts[66] = "Ü" $CodeAlts[67] = "Ý" $CodeAlts[68] = "&" $CodeAlts[69] = "&" $CodeAlts[70] = "&" $CodeAlts[71] = "&" $CodeAlts[72] = "&" $CodeAlts[73] = "&" $CodeAlts[74] = "&" $CodeAlts[75] = "&" $CodeAlts[76] = "&" $CodeAlts[77] = "&" $CodeAlts[78] = "&" $CodeAlts[79] = "&" $CodeAlts[80] = "&" $CodeAlts[81] = "&" $CodeAlts[82] = "&" $CodeAlts[83] = "&" $CodeAlts[84] = "&" $CodeAlts[85] = "&" $CodeAlts[86] = "&" $CodeAlts[87] = "&" $CodeAlts[88] = "&" $CodeAlts[89] = "&" $CodeAlts[90] = "&" $CodeAlts[91] = "&" $CodeAlts[92] = "&" $CodeAlts[93] = "&" $CodeAlts[94] = "&" $CodeAlts[95] = "&" $CodeAlts[96] = "&" $CodeAlts[97] = "&" $CodeAlts[98] = "&" $CodeAlts[99] = "&" $CodeAlts[100] = "&" $CodeAlts[101] = "&" DIM $Chars[103] $Chars[0] = "" $Chars[1] = CHR(34) $Chars[2] = "&" $Chars[3] = "<" $Chars[4] = ">" $Chars[5] = "™" $Chars[6] = " " $Chars[7] = "&" $Chars[8] = "&" $Chars[9] = "&" $Chars[10] = "¤" $Chars[11] = "&" $Chars[12] = "&" $Chars[13] = "§" $Chars[14] = "¨" $Chars[15] = "&" $Chars[16] = "&" $Chars[17] = "&" $Chars[18] = "&" $Chars[19] = "&" $Chars[20] = "&" $Chars[21] = "&" $Chars[22] = "°" $Chars[23] = "±" $Chars[24] = "²" $Chars[25] = "³" $Chars[26] = "&" $Chars[27] = "&" $Chars[28] = "&" $Chars[29] = "·" $Chars[30] = "&" $Chars[31] = "¹" $Chars[32] = "&" $Chars[33] = "&" $Chars[34] = "¼" $Chars[35] = "½" $Chars[36] = "¾" $Chars[37] = "&" $Chars[38] = "À" $Chars[39] = "Á" $Chars[40] = "Â" $Chars[41] = "Ã" $Chars[42] = "Ä" $Chars[43] = "Å" $Chars[44] = "Æ" $Chars[45] = "Ç" $Chars[46] = "È" $Chars[47] = "É" $Chars[48] = "Ê" $Chars[49] = "Ë" $Chars[50] = "Ì" $Chars[51] = "Í" $Chars[52] = "Î" $Chars[53] = "Ï" $Chars[54] = "Ð" $Chars[55] = "Ñ" $Chars[56] = "Ò" $Chars[57] = "Ó" $Chars[58] = "Ô" $Chars[59] = "Õ" $Chars[60] = "Ö" $Chars[61] = "×" $Chars[62] = "Ø" $Chars[63] = "Ù" $Chars[64] = "Ú" $Chars[65] = "Û" $Chars[66] = "Ü" $Chars[67] = "Ý" $Chars[68] = "Þ" $Chars[69] = "&" $Chars[70] = "à" $Chars[71] = "á" $Chars[72] = "&" $Chars[73] = "&" $Chars[74] = "&" $Chars[75] = "&" $Chars[76] = "&" $Chars[77] = "&" $Chars[78] = "è" $Chars[79] = "é" $Chars[80] = "ê" $Chars[81] = "&" $Chars[82] = "ì" $Chars[83] = "í" $Chars[84] = "&" $Chars[85] = "&" $Chars[86] = "&" $Chars[87] = "&" $Chars[88] = "ò" $Chars[89] = "ó" $Chars[90] = "&" $Chars[91] = "&" $Chars[92] = "&" $Chars[93] = "÷" $Chars[94] = "&" $Chars[95] = "ù" $Chars[96] = "ú" $Chars[97] = "&" $Chars[98] = "ü" $Chars[99] = "&" $Chars[100] = "&" $Chars[101] = "&" $CodeTexts = SPLIT($string, "&") FOR $Counter = 0 TO UBOUND($CodeTexts) IF INSTR($CodeTexts[$Counter], ";") <> 0 $Code = SPLIT($CodeTexts[$Counter], ";")[0] IF LEFT($Code, 1) = "#" $Char = CHR(SUBSTR($Code, 2, LEN($Code))) ELSE $AltAPos = ASCAN($CodeAlts, "&" + $Code + ";") $Char = $Chars[IIF(-1 < $AltAPos, $AltAPos, 0)] ENDIF $CodeTexts[$Counter] = $Char + SUBSTR($CodeTexts[$Counter], INSTR($CodeTexts[$Counter], ";") + 1, LEN($CodeTexts[$Counter])) ENDIF NEXT $HTMLtoText = JOIN($CodeTexts, "") NEXT $nul = SETOPTION("CaseSensitivity", "$OriginalCase") EXIT 1 ENDFUNCTION
帮帮我吧!我实在对vb不会呀!3Q!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
这段怎么改呀?急死了
代码:
$CodeTexts = SPLIT($string, "&") FOR $Counter = 0 TO UBOUND($CodeTexts) IF INSTR($CodeTexts[$Counter], ";") <> 0 $Code = SPLIT($CodeTexts[$Counter], ";")[0] IF LEFT($Code, 1) = "#" $Char = CHR(SUBSTR($Code, 2, LEN($Code))) ELSE $AltAPos = ASCAN($CodeAlts, "&" + $Code + ";") $Char = $Chars[IIF(-1 < $AltAPos, $AltAPos, 0)] ENDIF $CodeTexts[$Counter] = $Char + SUBSTR($CodeTexts[$Counter], INSTR($CodeTexts[$Counter], ";") + 1, LEN($CodeTexts[$Counter])) ENDIF NEXT $HTMLtoText = JOIN($CodeTexts, "") NEXT $nul = SETOPTION("CaseSensitivity", "$OriginalCase") EXIT 1
这段怎么改呀?急死了
代码:
$CodeTexts = SPLIT($string, "&") FOR $Counter = 0 TO UBOUND($CodeTexts) IF INSTR($CodeTexts[$Counter], ";") <> 0 $Code = SPLIT($CodeTexts[$Counter], ";")[0] IF LEFT($Code, 1) = "#" $Char = CHR(SUBSTR($Code, 2, LEN($Code))) ELSE $AltAPos = ASCAN($CodeAlts, "&" + $Code + ";") $Char = $Chars[IIF(-1 < $AltAPos, $AltAPos, 0)] ENDIF $CodeTexts[$Counter] = $Char + SUBSTR($CodeTexts[$Counter], INSTR($CodeTexts[$Counter], ";") + 1, LEN($CodeTexts[$Counter])) ENDIF NEXT $HTMLtoText = JOIN($CodeTexts, "") NEXT $nul = SETOPTION("CaseSensitivity", "$OriginalCase") EXIT 1
还有这个怎么写成C++代码? $OriginalCase = SETOPTION("CaseSensitivity", "ON")
搜索更多相关主题的帖子: 代码 拜谢 TABLE cellPadding 
2004-06-08 10:32
flylee
Rank: 5Rank: 5
等 级:职业侠客
帖 子:309
专家分:374
注 册:2004-8-10
收藏
得分:0 
不好意思,实在是看不清楚
2004-08-12 19:19
cantion
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2006-2-28
收藏
得分:0 
是不是有心为难的啊????
2006-03-01 23:12
三¥叶¥虫
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2006-3-1
收藏
得分:0 
晕了
什么哦

2006-03-01 23:24
快速回复:求助!!这段代码如何写成c++代码?拜谢了!!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.036781 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved