问题标签 [continue]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
6522 浏览

c++ - for 循环和 if 条件中的 continue 语句

我有以下代码片段,我得到的输出是 4。如果需要 i=2 或 0,请解释我。我很困惑。输出是4?

0 投票
0 回答
75 浏览

collision - 继续碰撞

我的 javascript 碰撞检测功能有问题。每当发生碰撞时,一个固定的物体不应该移动,玩家应该继续但在另一个方向,这样他就可以绕过它。很难描述,所以我准备了一些例子:

继续碰撞

红色箭头代表原来的运动方向。绿色箭头代表一个新方向 - 我需要那个方向的角度(在图片上,它是 90 度)

这是另一个例子: http: //jsfiddle.net/kukas/xnB2M/3/你可以在那里看到我的碰撞检测功能。绿色方块代表解决方案,红色方块代表问题。:)

奖励:如果您解决了另一个问题,我将不胜感激 - 碰撞不是像素完美的。但这不是那么重要。

0 投票
10 回答
25758 浏览

c# - 何时在 C# 中使用“继续”关键字

最近,我正在处理一个开源项目,虽然我已经在 .NET 中开发了几年,但我之前没有偶然发现这个continue关键字。

问题:有哪些最佳实践或领域可以从使用continue关键字中受益?我以前可能没有看到它有什么原因吗?

0 投票
2 回答
419 浏览

bash - how to program wait and continue in this bash script

I have two shell scripts say A and B. I need to run A in the background and run B in the foreground till A finishes its execution in the background. I need to repeat this process for couple of runs, hence once A finishes, I need to suspend current iteration and move to next iteration.

Rough idea is like this:

how do I use 'wait' and 'continue' so that B runs as many times while A is in the background and the entire process moves to next iteration once A finishes

0 投票
2 回答
579 浏览

android - 如何完成“继续”;我放在if语句之后?

我做了一个声明,如果它是真的,它会继续,我想停止这个“继续”并做出另一个声明,例如触地得分和触地得分。

这是我的代码

0 投票
4 回答
1253 浏览

php - 继续使用 mysql_fetch_assoc

我有几行代码,但找不到正确使用它的正确方法。

假设我在 DB 中有 133 个结果。它将获得前 50 个 - 在 for 循环中执行某些操作,然后再执行 50 个,将再次通过 for 循环并停止。最后 33 个结果将保持不变。它会得到它们,但因为无法达到 50 将停止并且它们不会通过 for 循环。

我的问题是如何在下面的循环中“发送”它们?

0 投票
7 回答
5337 浏览

python - 为什么 Python 的“finally”子句中不允许“continue”?

以下代码引发语法错误:

为什么子句continue中不允许有finally语句?

PS另一方面,这个其他代码没有问题:

如果重要的话,我使用的是 Python 2.6.6。

0 投票
2 回答
8624 浏览

shell - 在 shell 脚本中循环第一次运行继续

如何打破whileshell脚本中的无限循环?

我想PHP在 shell 脚本中实现以下代码:

0 投票
11 回答
203427 浏览

python - 在 Python 中使用“继续”语句的示例?

声明的定义continue

continue语句继续循环的下一次迭代。

我找不到任何好的代码示例。

continue有人可以建议一些必要的简单案例吗?

0 投票
1 回答
118 浏览

iphone - 继续执行方法,即使它的 ViewController 在 iOS 中消失

我有一个使用导航控制器推送另一个视图的视图。在第二个视图中,我播放一个我想继续播放的音频,即使用户返回第一个视图,弹出第二个视图,就像在 iPod 应用程序中一样。我怎样才能做到这一点?