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

Visual Basic 2017 程式設計




                    ɚe੬ᅰୌ໮ٙ܁ѓ

                        ༧ᜊᅰɓᅵd੬ᅰୌ໮€˸ɨᔊ၈੬ᅰ͵ცࠅৣໄাኳ᜗dၾᜊᅰʔΝٙ݊d

                    ੬ᅰୌ໮͍νՉΤ၈הͪdί዆ࡈ೻όʕேʔึҷᜊՉ࠽d݂၈މ੬ᅰf೻όணࠇ
                    ʕdϞՇ၇ڌͪ੬ᅰٙ˙όj(1) ɓ၇݊˖οό€LiteralfԷνjٜટ˸ 15 א 3.14159

                    ڌͪݔɓ੬ᅰi(2) ̤ɓ၇ۆ͉݊ఊʩהࠅʧୗٙ੬ᅰୌ໮ό€Symbolicfʘה˸
                    ცࠅ੬ᅰୌ໮d݊ΪމϞԬᅰοί೻όʕึʔᓙٙࠠል̈ତdމəᄣ̋೻ό̙ٙᛘ

                    ׌ʿಯˇ೻όᒟɝٙ௦๨dϤࣛу̙͜ɓࡈϞจ່ٙୌ໮˾ಁdШ̀඲ίୌ໮ʘۃ
                    ̋ɪڭवο Constdۆ༈ୌ໮ٙ࠽ਗ਼͑Ⴣڭܵίה܁ѓٙୌ໮ʕd೻όʕ΂ОЗໄѩ

                    ʔঐҷᜊՉ࠽dϤ၈މ੬ᅰୌ໮dᔊ၈੬ᅰfԷνj׵лࢹٙࠇၑdᏐਗ਼лଟ RATE
                    ணމ੬ᅰf

                        Const RATE=0.2


                    ۆӊϣࠅԴ͜лଟࣛd̥ࠅ෬ɝ RATE у̙€ൗ ੬ᅰୌ໮ஷ੬ਗ਼ӊɓࡈο͎ѩ͜ɽᄳڌ

                    ͪfܙϞಃɓ˚̀඲ሜ዆лଟࣛd̥ࠅί೻όٙ௰ۃࠦࡌҷϤ੬ᅰୌ໮ٙ࠽у̙f
                    ߰͊Դ͜੬ᅰୌ໮୕ɓϤ࠽dۆΪϤ੬ᅰ౳ໝ೻ό΢ήϾೌجᆽڭϤ࠽ٙɓߧ׌f

                    ˸ɨાࠑ݊੬ᅰ܁ѓٙႧجd˲ʔܸ͜ݼՉۨйfVB ਗ਼ึԱ๫ה፩ɝٙ࠽d፯኿௰
                    ቇ຅ٙাኳ᜗ৣໄf

                        Const ੬ᅰᗆйο = ੬ᅰ


                    א٫dЫɰ̙˸ܸݼՉۨйf

                        Const ੬ᅰᗆйο As ༟ࣘۨй = ੬ᅰ


                    ˸ɨાࠑу݊܁ѓ੬ᅰ I = 3f

                        Const I = 3                      ' ʔܸݼ I ٙۨй


                    א݊

                        Const I As Short = 3             ' ܸݼ I މ዆ᅰۨй











              22
   25   26   27   28   29   30   31   32   33   34   35