close

標題:

請問這個語法是什麼意思﹖是VB的

aa.jpg

 

此文章來自奇摩知識+如有不便請留言告知

發問:

Private Sub btnDisplay_Click(...) Handles btnDisplay.Click Dim item As String, regularPrice, discount As Double item = "ketchup" regularPrice = 1.8 discount = 0.27 'Note the continuation character "_" at end of line txtOutput.Text = Chr(34) & (regularPrice... 顯示更多 Private Sub btnDisplay_Click(...) Handles btnDisplay.Click Dim item As String, regularPrice, discount As Double item = "ketchup" regularPrice = 1.8 discount = 0.27 'Note the continuation character "_" at end of line txtOutput.Text = Chr(34) & (regularPrice - discount) & _ " is the sale price of " & item & "." & Chr(34) End Sub Chr(34) 是什麼意思/ 謝謝

最佳解答:

Chr(34) means that the total number of characters is 34. So from your example, we have to take into account the variables of what wants to be typed in. So to find your 34 characters, it can be calculated... regularPrice = 12 characters discount = 8 characters is the sale price of = 14 character 12 + 8 + 14 = 34 *note that the spaces within the text is not included*

其他解答:

Chr(34) means that the total number of characters is 34? 唔好玩啦|||||Chr()係由內碼取字,Chr(34)即係內碼34既字,即係"

arrow
arrow
    創作者介紹
    創作者 gbu94mz95e 的頭像
    gbu94mz95e

    gbu94mz95e的部落格

    gbu94mz95e 發表在 痞客邦 留言(0) 人氣()