当前位置:网站首页>Three types of jump statements
Three types of jump statements
2022-04-23 03:28:00 【Aiyou coffee】
break: The body of any loop statement , All available break Control the circulation process ,break Used to force out of the loop , And execute the remaining statements in the loop .
Change program control flow . be used for do-while,while,for You can jump out of the loop and execute the following statement ( Judge the entered scores break , If it is less than 0, It will be marked as an error state , And will immediately jump out of the whole for loop )
continue: Statements are used in loop statements , Used to terminate a cycle process , That is to skip the statement that has not been executed in the loop body , Then, the next decision on whether to execute the loop .
return: Exit from current method , Return to the statement that called the method , And continue execution from the next statement of the statement .
Two formats of return statement :
1.return expression: Returns a value to the statement that calls the method ( The data type of the return value must be the same as that in the method declaration The return value type of is consistent or the precision is lower than the declared data type )
2.return: When used in a method declaration void Declare that the return type is null , This return type should be used , It does not return any value .
So the conclusion is :
break:switch sentence , Loop statement
countinue: Loop statement
return: Any statement that ends the current method has nothing to do with the loop
版权声明
本文为[Aiyou coffee]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220619008986.html
边栏推荐
- Explanation keyword of MySQL
- Basic use of Charles
- A comprehensive understanding of static code analysis
- Applet - WXS
- PYMOL-note
- Use of ADB command [1]
- Applet - more than two pieces of folding and expansion logic
- Batch download of files ---- compressed and then downloaded
- 批量下載文件----壓縮後再下載
- Visual programming -- how to customize the mouse cursor
猜你喜欢

Section 2 map and structure in Chapter 6

C interface

Romantic silhouette of L2-3 of 2022 group programming ladder Simulation Competition (25 points)

关于idea调试模式下启动特别慢的优化
![Detailed description of MySQL index [B + tree index, hash index, full-text index, overlay index]](/img/1a/a22b4a35d3c083438d0f766a5ecb08.png)
Detailed description of MySQL index [B + tree index, hash index, full-text index, overlay index]
![General test technology [II] test method](/img/b7/f661f446616ad6bfbbf48eb03ea82d.png)
General test technology [II] test method

2022 group programming ladder game simulation L2-4 Zhezhi game (25 points)

Quartz. Www. 18fu Used in net core

Chapter 9 of C language programming (fifth edition of Tan Haoqiang) analysis and answer of exercises for users to establish their own data types

Visual programming - Experiment 1
随机推荐
MySql分组查询规则
C-11 problem I: find balloon
Supersocket is Use in net5 - concept
socket编程 send()与 recv()函数详解
Chapter VI, Section III pointer
Section 2 map and structure in Chapter 6
you need to be root to perform this command
场景题:A系统如何使用B系统的页面
Chapter 9 of C language programming (fifth edition of Tan Haoqiang) analysis and answer of exercises for users to establish their own data types
7-1 introduction to finance
Unity basics 2
Node configuration environment CMD does not take effect
2022 group programming ladder simulation match 1-8 are prime numbers (20 points)
Five tips for cross-border e-commerce in 2022
Flink customizes the application of sink side sinkfunction
Query stored procedures in PostgreSQL
PyMOL usage
. NETCORE sets the API post mode, which can accept parameters directly in parentheses
2022 团体程序设计天梯赛 模拟赛 1-8 均是素数 (20 分)
JS takes out the same elements in two arrays