Joke Collection Website - Joke collection - What are vb and delphi again?
What are vb and delphi again?
Before the introduction. NET framework
VB 1
DOS version of VB 1.0
1991April, Visual Basic 1.0 for Windows was released. 1992 September, Visual Basic 1.0 for DOS was released. The development of this connection programming language and user interface is called Tripod (sometimes called Ruby), and the original design was completed by Alan Cooper. This caused a great sensation at that time. Many experts believe that the emergence of VB is an epoch-making event in the history of software development. From now on, the function of VB 1.0 is actually very weak, but it was the first "visual" programming software when it was launched. This makes programmers enjoy it and try to create software on the platform of VB.
VB 2
1992165438+1October, released by VB2.0, improved the interface and speed of the previous version.
VB 3
In the summer of 1993, VB3.0 was released, which was divided into standard version and professional version. It contains a data engine, which can directly read the Access database. This greatly improves the database programming ability of VB.
VB 4
1In August, 1995, VB4.0 released a 32-bit version and a 16-bit version. It includes support for classes. Since VB4, the idea of object-oriented programming has been gradually introduced. VB is powerful and easy to learn. Moreover, VB also introduces the concept of "control", so that a large number of compiled VB programs can be directly used by us.
Visual Basic 1.0~4.0 must compile the source code into VB pseudocode and then explain and execute it.
VB 5
1997 February, released by VB5.0. Programmers can use the 32-bit version to import the 16-bit program created by the 4.0 version and compile it smoothly. At the same time, it also supports user-built controls. Starting from Visual Basic 5.0, VB supports compiling native code, but it can only work with the support of VB runtime.
VB 6
1998 summer, released by VB6.0. VB6 is a version that cannot be completely replaced by VB.NET.
I'm introducing it. NET framework
Main entrance: Visual Basic. net
VB.NET 7
200 1, Visual Basic. NET and. NET framework. Because of its new core and features, many VB programmers have to rewrite their programs.
In 2002. NET 2002 (v7.0) came out, and since then, Visual Basic has been included in the Visual Studio suite.
In 2003, Visual Basic. NET 2003 (v7. 1).
VB.NET 8
In 2004, Microsoft opened the beta version of Visual Studio.NET 2005 (code name Whidbey). That contains the beta version. NET framework 2.0. 2005 released11.07 Visual Basic 2005 (V8.0). At the same time, a free simplified version of Express Edition of Visual Basic 2005 is provided for beginners and students. The initial free use period was one year, and then Microsoft announced that the Express version was free forever. The obvious advantage of Visual Basic 2005 is that you can directly write Windows XP-style controls. But its applet needs nearly 10MB of memory.
VB.NET 9
In February 2008, 1 was released in Visual Basic 2008 (v9.0).
After several years of development, it has become a special development language and environment. Users can quickly create Windows programs with Visual Basic, and now they can write enterprise-level client/server programs and powerful database applications.
VB.NET 10
Visual Basic 10.0 was officially released on March 22nd, 20 10 with Visual Studio 20 10.
New features:
Auto-realization attribute
Setup initialization
When the code is broken, the underscore "_" is not required.
Better lambda expression support
Better interoperability with dynamic languages such as Python and Ruby.
Visual Basic。 NET 2002(7.0) and later versions are available in. NET framework environment.
A language derived from VB
Microsoft has developed a series of scripting languages about VB:
Visual Basic for Applications VBA is included in Microsoft applications (such as Microsoft Office) and third-party products (such as WordPerfect Office). VBA is embedded in various applications, which seems contradictory, but its function is as powerful as VB.
VBScript is the default language of ASP, and can also be used in Windows scripts and Web page coding (HTML). Although its grammar is similar to VB, it is a completely different language. VBS does not run with VB runtime, but is interpreted and executed by Windows script host (wscript. exe- script host based on Microsoft Windows). The difference between the two languages affects the performance of ASP website.
When Microsoft is ready to develop a new programming tool, the first decision is whether to modify it with the most sought-after VB6 or re-establish a new engineering development tool. Microsoft later developed Visual Basic. NET, which is the successor of VB, is also. NET platform. VB.NET programming language is a real object-oriented programming language (VB4-VB6 can only be called object-based but not object-oriented, and the most obvious feature is that none of VB4-VB6 supports class inheritance), which is not completely compatible with traditional Visual Basic.
language feature
The central idea of VB is to make programmers simple, whether novice or expert. The GUI system used by VB can simply create application programs, but it can also develop quite complicated programs. VB program is a form-based arrangement and combination of visual components, and code is added to specify the properties and methods of the composition. Because the default properties and methods have been partially defined in the component, programmers can complete a simple program without writing too much code. In the past version, the performance of VB program has been put on the desktop, but with the rapid improvement of computer speed, the debate about performance has become less and less.
The addition and change of form controls can be realized by drag-and-drop technology. A toolbox full of controls is used to display available controls (such as text boxes or buttons). Each control has its own properties and events. Default property values are provided when the control is created, but programmers can also change them. Many attribute values can be changed with the user's actions and modifications at runtime, thus forming a dynamic program. For example, code that can change the position of a control is added to the form size change event, and the control will change its position whenever the user changes the window size at run time. By adding the corresponding code in the text change event in the text box, the program can automatically translate or block the input of certain characters when inputting text.
A VB program can contain one or more forms, or a main form and multiple sub-forms, similar to the appearance of an operating system. Dialog windows with few functions (such as forms without maximize and minimize buttons) can be used to provide pop-up functions.
Components of VB may or may not have a user interface. In this way, the server-side program can handle the added module.
VB uses the method of reference counting to collect garbage, which contains a large number of objects and provides basic object-oriented support. Because more and more groups appear, programmers can choose the extension libraries they need. Unlike some languages, VB is case-insensitive, but it can automatically convert keywords into standard case state and force variable names of entities in the symbol table to follow the writing rules. By default, string comparisons are case sensitive, but this feature can be turned off.
VB makes a large number of external controls have their own living space. Provides a large number of third-party controls for VB. VB also provides methods to create, use and reuse these controls, but it is not easy to create another control from one application due to language problems.
school term
When discussing Visual Basic (excluding. NET), you can often hear the following terms, so it is very helpful for beginners to master the basic understanding of these terms.
Control: Simply put, control is a graphical tool to form or build a Visual Basic application, including forms, buttons, check boxes, list boxes, data controls, table controls, picture controls and so on. ...
Event: an action triggered by the user or the operating system, such as keystroke, mouse click, mouse double click, time limit or receiving data from a port.
Method: The program code embedded in the object definition defines how the object processes information and responds to events. For example, a database object has the basic elements of a method program that opens a recordset and moves from one record to another. It contains attributes that define its characteristics, define its tasks, and identify the events it can respond to. Controls and forms are examples of all objects in Visual Basic.
Objects: controls, forms, etc. Can be seen as an object.
Process: A code segment written to accomplish certain tasks. Procedures are usually used to respond to specific events and can also be used as custom functions of applications.
Attributes: Attributes are concrete descriptions of the attributes of the objects that make up the user interface. For example, the size, position, color, width, height and so on of the "object" mentioned above are all called the attributes of the control. Attributes determine the appearance and sometimes the behavior of an object. Most of the attributes of the object have been predefined in VB, but some attributes need to be defined in the application process. Attributes can provide data for objects and retrieve information from them.
Changes in VB.NET
Functions that VB (before 6.0) does not have.
Inheritance (Computer Science): After Visual Basic 5, although VB provided simplified class support, it still could not meet the needs of programmers.
Multi-thread support: Although it can be completed by using Windows API, it is difficult to guarantee stability and debugging.
Exception handling: Only "On Error Goto line" statement is supported.
Support for pointers is very limited.
VB can only support 8-32-bit integers, and many languages are infinitely supported.
VB is not allowed to store unchanging variables in any array.
VB does not support other programming languages * * * to enjoy the program code.
Versions after Visual Basic. NET(VB 7.0) basically supports the above functions.
Comparison between VB 6 and VB.NET
Many programmers will also miss VB6. VB6 still retains some features of scripting language, such as not declaring variable types in advance. When assigning a value to a variable of undeclared type for the first time, VB6 will take the type of this value as the type of the variable. The characteristics of this scripting language have many adverse effects on the maintainability of the program, especially for beginners, which will form bad programming habits, so the versions after VB.NET did not retain this feature.
Basic is made as a programming language for beginners and appears in the form of literal translation (see VB pseudocode). It also has the feature of not having to declare the variable type in advance. This feature plays a positive role in helping beginners to get started quickly, and can make beginners complete simple code writing faster without worrying about which variables to use and which types to choose. For people with some programming experience, it is annoying to declare the type of variable I frequently in for i= 1 to 9, so this feature is quite pleasing in some occasions.
The specific changes in VB.NET are as follows:
Definition and call of subroutine (function).
Sets the initial value of the array and needs to indicate the range.
Change of function format: date function, time function and some mathematical functions cannot be used directly, and string function cannot be used. The definition of the first parameter of DatePart, DateAdd and DateDiff functions has changed.
Set reserved words are no longer used.
Wend reserved words are replaced by End While.
New operators:+=,-=,/=, * =.
disadvantaged
Such a big change was once considered by Microsoft to extend the vitality of VB. As a result, VB was changed almost beyond recognition and became a new language similar to C#. The VB6 program can hardly run in VB.NET. Although Microsoft provides an "upgrade wizard" for this problem, it can't make a complete transformation. In this way, programmers have to make considerable efforts to manually convert the code.
In 2005, Microsoft announced that it would no longer support Africa. NET version of VB. The VB community immediately responded and expressed concern about this news. Some old users also submitted petitions, hoping to continue to provide technical support for VB. Microsoft is not willing to change their decision yet.
Controversy about VB
opposition
VB is a controversial language: many programmers have a strong aversion to the quality of VB programs. Many people think VB is not suitable for them, and it is the language of children and programmers. From the beginning of design, it is a simple language. Some features in C++ and Java do not appear in VB. While feeling the convenience and speed of development, some functions similar to compile-time type and declaration checking are turned off by default. So some programmers lamented the availability of VB, while watching some similar "undefined type" errors in dismay.
Some critics think that the simple features of VB will make it harmful in the future. Many people taught themselves VB, but they didn't learn good programming habits. When VB enters the classroom, students will not learn many basic program techniques and structures, because many techniques are already included in those components that users can see. There is no need to learn standard programming habits, because VB has the characteristics of visualization, which leads to some inexplicable codes. In addition, many errors and warnings are checked by default, which makes it difficult for programmers to find hidden errors. Experienced programmers will turn on these options when programming in VB.
Many critics criticized Microsoft for simply copying the idea of BASIC into VB. Edsger Dijkstra, a famous computer scientist, famously said, "If a student has studied BASIC at the earliest, it is almost impossible for him to learn excellent programming, because these people have given up the hope of rebirth." (Dijkstra has no mercy on Fortran, PL/ 1, COBOL and APL. Another joke is: "Real programmers don't use BASIC. Only/kloc-children under 0/2 years old can use it. "
It is not very simple, and the program it develops can only run under Microsoft Windows.
The file is too big. Visual Studio needs several disks to install. VB programs also need a runtime with the size of 1.4M at runtime.
There is an error in the IDE.
VB can't synthesize the basic API of Windows well, and it often uses the "tricks" of low-level operation to program. The low-level memory operation of C language is much simpler than VB.
supporter
However, many supporters of VB explain that the ease of use of VB is its greatest advantage, which allows experienced VB programmers or people who just know a little about it to develop programs quickly in their own way. Moreover, VB program can connect with database very simply. For example, you can bind the database and controls, so that the program written in VB can master all the information of the database without writing a line of code.
Many language features, such as GoSub, On Error and judging the declaration type by the last character of the variable name (such as string str$), are all from BASIC. The syntax of VB is different from most languages, which may confuse new programmers. For example, the statement "Dim a, b, c As Integer" declares that c is an integer variable, but a and b are still variant (Object in). NET) type. (if you want to declare three integers, you must write dim a as an integer, b as an integer, and c as an integer; Writing Dim a directly, without writing the type later, will automatically become Variant Type-taking up a lot of resources. This problem has been solved in VB.NET's later version. Dim a, B and C are all Integers as the type of integer).
There are also some features, such as the underscore character "_" supporting one line of code to write multiple lines. Some programmers make mistakes because they don't conform to the specifications when using them.
abstract
VB will attract more praise and criticism, and will continue to be used by users and programmers. It is very suitable for developing user-friendly programs (such as terminal data) and not suitable for developing other programs (such as joint computing programs).
VB is a good entry software for beginners, especially for those who have programming talent but don't know it themselves. Starting with VB, it is easy to stimulate their potential and give full play to their talents in this field.
- Related articles
- What does dzi Zhu think of the year?
- Spiritual Enlightenment: You can’t wait for others to arrange your life
- Was Wu Siyue killed?
- Who hit Hong?
- Is the relationship between men and women like fingers and nostrils?
- How to shoot a video tutorial in Tik Tok
- I wish I didn't have to read my jokes.
- Will there be fewer and fewer surnames in China?
- Just kidding. Rare.
- The hairy crabs that the Foshan brothers wanted to keep as pets were boiled and eaten by their father with tears. Was it "really delicious"?