An Introduction to Programming with Visual Basic for Applications
معرفی کتاب «An Introduction to Programming with Visual Basic for Applications» نوشتهٔ Claudio Fornaro، منتشرشده توسط نشر Celid در سال 2006. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «An Introduction to Programming with Visual Basic for Applications» در دستهٔ بدون دستهبندی قرار دارد.
Programming is scientific creativity supported by study of theory. It is essential to know how a computer works and to have the bases of logics and mathematics, but proficiency requires knowledge of the fundamental programming algorithms and techniques developed by the scientific community for the most classic problems. However, learning programming starts from knowing the language syntax and using it to describe a solution of a problem. This is the most complex obstacle, because it requires the development of a precise and procedural reasoning. This book was designed to be used in a course of programming basics. It is addressed to beginners, and therefore it only covers the basic procedural elements of the language; these, however, constitute the basis of each type of programming. The choice to adopt Visual Basic for Applications instead of other more powerful and “noble” languages is essentially due to its lower impact on beginners, together with its easiness in building visual interfaces. Moreover, the required software is also easy to find and install: it is included in every application of the Microsoft Office suite (Excel, Word, etc.). In addition, it may be worth noting that Visual Basic is one of the most used programming languages in the world. Understanding this book requires no previous programming experience and no mathematics skill other than some high school algebra notions. Many notes, tips, and solved exercises make it suitable for self-taught students as well. Preface vii 1 Introduction 1 1.1 Languages and Translators 1 1.2 The Integrated Development Environment 3 1.3 Building a Graphical Interface 5 2 A First Experiment 9 2.1 Exercises 14 3 Variables and Numerical Types 15 3.1 Numerical variables 16 3.1.1 Numerical Expressions 18 3.1.2 Evaluation of Numerical Expressions 18 3.1.3 Type Conversion Functions 21 3.1.4 Intrinsic Functions 23 3.1.5 Operators Priority and Associativity 23 3.2 Numerical Constants 24 3.3 Exercises 26 4 Keyboard Input and Screen Output 27 4.1 The MsgBox Instruction 27 4.2 The InputBox Instruction 29 4.3 Exercises 30 5 Conditional Execution 31 5.1 The If-Then Statement 31 5.2 Relational Expressions 36 5.3 Logical Expressions 37 5.3.1 The Or Operator 37 5.3.2 The And Operator 37 5.3.3 The Xor Operator 37 5.3.4 The Not Operator 38 5.4 Operators Precedence 38 5.5 The Select Case Statement 39 5.6 Exercises 42 6 Strings 45 6.1 String Variables 46 6.2 String Operators 47 6.3 String Functions 48 6.3.1 Len 48 6.3.2 Left 48 6.3.3 Right 48 6.3.4 Mid 49 6.3.5 Instr 49 6.3.6 Other String Functions 50 6.4 String Comparison 52 6.5 Exercises 54 7 Unconditional Jumps 55 8 Loop Statements 57 8.1 The For-Next Loop 58 8.2 Exercises 63 8.3 The Do-Loop Loop 64 8.4 Exercises 67 9 Arrays and Matrices 69 9.1 Matrices 71 9.2 String Arrays and Matrices 72 9.3 Exercises 73 10 Files 75 10.1 Opening a File 76 10.2 Closing a File 77 10.3 Writing to a File 78 10.4 Reading from a File 79 10.5 Exercises 83 11 Functions and Subroutines 85 11.1 Functions 88 11.2 Subroutines 89 11.3 Arguments and Formal Parameters 90 11.3.1 Arguments passage 91 11.3.2 Vector Arguments and Parameters 93 11.4 Static Variables 94 11.5 Non-local Variables 94 11.6 Variable Initialization 95 11.7 Recursion 96 11.8 Exercises 98 12 Compound Data Types 101 12.1 Exercises 103 13 Some Basic VBA Controls 105 13.1 The Label Control 105 13.2 The TextBox Control 106 13.3 The OptionButton Control 108 13.4 The CheckBox Control 109 13.5 Disabling and Hiding Controls 110 14 Good Programming Practices 111 14.1 Implicit Variables 111 14.2 Code Indentation 111 14.3 Comments 112 15 Debugging 113 16 More Complex Exercises 115 17 Solution to the Exercises 123 17.1 Chapter 2 - A First Experiment 123 17.2 Chapter 3 - Variables and Numerical Types 124 17.3 Chapter 4 - Keyboard Input and Screen 126 17.4 Chapter 5 - Conditional Execution 126 17.5 Chapter 6 - Strings 131 17.6 Chapter 8 - Loop Statements 137 17.7 Chapter 9 - Arrays and Matrices 150 17.8 Chapter 10 - Files 161 17.9 Chapter 11 - Functions and Subroutines 173 17.10 Chapter 12 - Compound Data Types 185 17.11 Chapter 16 - More Complex Exercises 187
دانلود کتاب An Introduction to Programming with Visual Basic for Applications