Reposted from Sina Blog:
1: Why not use the GOTO statement?
Source (from Wikipedia ):
Goto is a statement that can be found in many computer programming languages. It is an English word.GoAndTo. When executing this statement, it transfers the
Objective
A goto statement is also called an unconditional transfer statement, and its basic form is as follows:
Statement marking by a valid identifier and symbol ";" , where the identifier's naming convention is the same as the variable name,
Function: the reuse of code can be Implemented. function only needs to be defined 1 times, then the code in the function can be arbitrarily called. -the Basic concept of an unknown source Learning and time learning, such as the wrong pen,
Goto can only jump to the function body, but not to the function in vitro. That is, Goto has a local scope and needs to be in the same stack.
To jumpProgramSegment start point plus the label. Part2 in the following example.
1. The GOTO statement
When considering what C + + is doing, Java is doing a good deed, simplifying the issue of how parameters are passed. In C + +, there is no method in C + +, which should be called "function" or "member function", and the parameters and method calls
This is a creation in
Article, where the information may have evolved or changed.
1. Block
The block is a pair of curly braces that enclose the declaration and statement. Block = "{" {statement ";"} "}".
In addition to the explicit source block,
1. BlockThe block is a pair of curly braces that enclose the declaration and statement. Block = "{" {statement ";"} "}".In addition to the explicit source block, there is an implicit block:
The full domain block contains all
This is a creation in
Article, where the information may have evolved or changed.
The scope of a variable is the extent to which the variable can be used effectively in program code. Do not mix scopes and lifetimes. A scope is an area of code, a
Use inline assembly in Visual C ++
I. Advantages
Inline assembly can be used to embed assembly language instructions in C/C ++ code without additional assembly and connection steps. In Visual C ++, inline assembly is a built-in compiler, so you
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.