作者: ChenRobert (羅伯陳) 看板: Visual_Basic
標題: [ASP ] 多行編譯時看成一行
時間: Fri Apr 23 20:48:27 2021
Para = Array ("0.918,0.473,0.931,0.478,DE795A,0.8,0"
"0.550,0.747,0.579,0.834,42C3F7,0.3,1"
"0.929,0.844,0.970,0.870,42C7F7,0.3,2"
)
我這樣就會編譯錯誤
請問要怎麼修正可以在編譯時候視為一行
就像是 C語言的 \
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.34.233.240 (臺灣)
※ 文章網址: https://webptt.com/m.aspx?n=bbs/Visual_Basic/M.1619182109.A.9BE.html
1F:推 fumizuki: 行尾空一格再加底線 04/23 20:51
感謝 不過run的時候又遇到 類型不符要怎樣解決?
因為這沒有辦法直接宣告string 要怎麼讓Para 知道自己吃的是string?
※ 編輯: ChenRobert (1.34.233.240 臺灣), 04/23/2021 21:36:46
2F:→ fumizuki: Array("", "", "") 你3個項目的分隔逗號沒給? 04/25 14:35
3F:→ ChenRobert: 後來更改過後有給,不然compile不過 04/25 17:26
4F:→ ChenRobert: 是build過 但執行會類型不符 04/25 17:27
5F:→ fumizuki: 猜不到你寫了什麼啊...不把程式碼貼上來嗎 04/25 18:20
6F:→ fumizuki: "第一個項目", _ 04/25 18:21
7F:→ fumizuki: "第二個項目, _ 04/25 18:21
8F:→ fumizuki: "第三個項目" _ 04/25 18:21
9F:→ fumizuki: ) '結尾 (第二個項目我漏打結束的雙引號) 04/25 18:22
Para = Array ("0.918,0.473,0.931,0.478,DE795A,0.8,0",/*演習開始介面*/ _
"0.550,0.747,0.579,0.834,42C3F7,0.3,1",/*演習對手訊息介面*/ _
"0.929,0.844,0.970,0.870,42C7F7,0.3,2",/*出擊編隊*/ _
"0.949,0.045,0.974,0.080,F7F3F7,0.2,3",/*戰鬥介面*/ _
"0.877,0.877,0.915,0.931,319AE7,0.1,4",/*結算介面*/ _
"0.970,0.907,0.987,0.980,42C3F7,0.2,5",/*大地圖介面*/ _
"0.135,0.000,0.167,0.027,5A59A5,0.8,6",/*敗北介面*/ _
"0.766,0.619,0.793,0.650,0075CE,0.1,7",/*受到伏擊介面*/ _
"0.655,0.204,0.757,0.259,B57552,0.3,8"/*連續刷圖介面*/ _
)
※ 編輯: ChenRobert (1.34.233.240 臺灣), 04/25/2021 18:38:27
10F:→ laechan: 給 response.write CStr(Para(1)) 看會怎樣 04/26 12:26
11F:→ laechan: 我覺得寫code時適度給一些空格會好一點可避免很多error 04/26 12:27
12F:→ ChenRobert: 解了 感謝 不能放在function裡面 宣告 dim para就好 04/26 22:23
13F:→ fumizuki: 註解符號不對,註解位置也不對 04/28 06:26
14F:→ fumizuki: 還有,ASP是直譯的,執行階段才編譯 04/28 06:31
15F:→ fumizuki: 副檔名是asp?還是aspx? 04/28 06:33