Page 29 - ePB316_最佳案例 Visual Basic 2017 程式設計
P. 29

Chapter 02 │基本語法






                             2-3cᜊᅰၾ੬ᅰٙ܁ѓ



                    ɓeᜊᅰٙ܁ѓ

                        ᜊᅰٙ̌ঐ݊͜Ը፩ɝeஈଣʿᎷπ̮ޢٙ༟ࣘdϾᜊᅰίԴ͜˸ۃѩࠅ׵ڭ

                    वο Dim ʘܝ܁ѓdʑ̙Դ͜fίɓԬᔚόٙ Basic ႧԊʕdᜊᅰԨʔცࠅԫ΋܁ѓd
                    ۍɰ੭Ը฽ɽٙѢᓔf˸ɨόɿуމᜊᅰ͊܁ѓٙܝ؈dᇜᙇኜکೌجΫᏐԴ͜٫

                    ίܳοɪٙ፹ႬdϾிϓৰ፹ɪٙѢᗭf

                        student = studend+1


                    ˸ɪાࠑ߰ԫ΋܁ѓ student νɨj

                        Dim student As Short

                    ۆᇜᙇኜ༾Ց studend ࣛdکึ౤፴Դ͜٫Ϥ studend Ԩ͊܁ѓٙ፹Ⴌৃࢹd౤፴Դ

                    ͜٫໾܁ѓאءจܳο፹ႬfՉϣdᜊᅰ܁ѓٙᎴᓃ̙݊ৣໄܦ຅ٙাኳ᜗Ͼ౤৷༟
                    ࣘٙஈଣࣖଟfԷνjϞԬᜊᅰٙ࠽ਹසމ዆ᅰdۆʔ͜܁ѓމओᓃᅰא Decimalf

                    ޟЇϞԬᜊᅰٙ࠽ਹʃՑԴ͜ Byte ۨйу̙ᎷπdϤࣛ຅್܁ѓމ Byte ۨйу̙f
                    வɰఱ݊ᜫʃ؇Г͜ʃᇌɿༀeɽ؇Г͜ɽᇌɿༀٙ༸ଣdνϤʑঐһϞࣖଟή၍

                    ଣাኳ᜗dϾ˲౤৷Չย༶஺ܓf

                    VB ᜊᅰٙ܁ѓٙᔊࠅႧجνɨj

                        Dim ᜊᅰΤ၈ As ༟ࣘۨй [= ڋ࠽ ]


                    Էνj˸ɨાࠑ̙܁ѓᜊᅰ a ٙۨйމ Shortf

                        Dim a As Short


                    ˸ɨાࠑ̙׵܁ѓᜊᅰٙΝࣛ͵̙ഗʚڋ࠽f

                        Dim a as Short =34

                    ߰ϞՇࡈ˸ɪٙᜊᅰϞ޴Νٙۨйd͵̙Νࣛഗʚ܁ѓdШ݊ᜊᅰʘගც˸ஸ໮€,

                    ཞකfԷνj˸ɨાࠑ̙Νࣛ܁ѓᜊᅰ bec ٙۨйމ Stringf

                        Dim b,c As String


                                                                                                            21
   24   25   26   27   28   29   30   31   32   33   34