Page 32 - ePB316_最佳案例 Visual Basic 2017 程式設計
P. 32
Visual Basic 2017 程式設計
動手做
識別字更正。請開啟主控台應用程式,並鍵入以下程式,若有錯誤,並完成更正。
Module Module1
Sub Main()
Dim a As Short
Dim 7a as Short
Dim +a as Short
Dim $sum as byte
Dim _a As Boolean
Dim a c as Char
Dim a+c as string
Dim if as Short
End Sub
End Module
2-4c༶ၑɿ
̙˸࿁༶ၑʩOperandੂБत֛̌ঐٙतࣿୌ၈މ༶ၑɿfɓছϾԊd༶
ၑɿ̙ʱމ˸ɨᗳjܸݼAssignment༶ၑɿeၑஔArithmetic༶ၑɿeᗫ
ڷRelational༶ၑɿeᜌ፨Logical༶ၑɿeοЕString༶ၑɿeልΥܸ
ݼ༶ၑɿʿЗʩЪBitwise༶ၑɿf
Ͼӊɓ၇༶ၑɿே̙˸ΎʱމɓʩUnary༶ၑɿၾɚʩBinary༶ၑɿf
ɓʩ༶ၑɿ̥ცࠅɓࡈ༶ၑʩఱ̙˸ЪdϾɚʩ༶ၑɿۆცࠅՇࡈ༶ၑʩʑঐ
Ъf
ί˸ɨఊʩʕdҢࡁৰəᏨൖ၇ʔΝٙ༶ၑɿ̌ঐ̮dᒔਗ਼ীሞ༶ၑɿٙᎴන
ҏPrecedenceၾഐΥܛAssociativityfᎴනҏ݊͜ԸӔ֛ΝɓόɿኹϞε
ࡈ༶ၑɿࣛdӊɓࡈ༶ၑɿආБ༶ၑٙනҏiϾഐΥܛۆӔ֛əίΝɓાࠑʕd
ΝᎴනҏٙ༶ၑɿੂБනҏf
24