zoukankan      html  css  js  c++  java
  • for语句的执行顺序

    for语句的执行顺序
    2007-09-08 10:58

    The for statement is written:

    for (e1e2e3statement

    First, e1, usually an assignment statement, is executed. Then e2, usually a comparison, is evaluated. If false, the for-loop terminates. If true,statement is executed. Finally, e3, usually an assignment statement, is executed, and control returns to evaluate e2 again.
    ================================================================================

    for语句的书写格式:

       for(e1;e2;e3)

            statement

    首先,运行e1,它通常是赋值语句,然后对e2求值,它通常是一个比较。如果e2的值为false,则结束循环。
    如果e2的值为true,则执行statement。最后,执行e3,它通常是赋值语句,然后控制转移到对e2再次求值。

  • 相关阅读:
    JavaScript面试库
    JS事件委托的原理和应用
    缓存ABC
    网络模型探究
    持续集成配置之Nuget
    angular应用容器化部署
    微服务随想
    .NET性能优化小技巧
    博客园博客小优化
    Emmet 简介
  • 原文地址:https://www.cnblogs.com/kex1n/p/2286528.html
Copyright © 2011-2022 走看看