• 空格和 空行


    function_name()

    {

      commands #缩进   缩进是空出四个空格

    赋值 = 左右不能加空格     value=4

    if加空格与[ 隔开              if  []      while  []

    空行起着分隔代码的作用

    函数开始和结束、判断或循环始末、函数调用始末以及前后联系不紧密的地方都要加空格

    if expression1

    then

      commands1

      …

    else

      commands2

      …

    fi

    if expression1

    then

      commadns1

    elif expression2

    then

      commands2

      …

    elif expressionN

    then

      commandsN

      …

    else

      commands(N+1)

      …

    fi

    while condition

    do

      commands

      …

    done

    for car in value_list

    do

      comands  

      …

    done

    for  ( init var; condition; change var )

    do

      comands

      …

    done

  • 相关阅读:
    redis--列表
    redis ——字符串
    redis 第一节 redis安装、PHP扩展 、主从
    Python--day7
    Python--day6
    Python爬虫
    JSON基础
    Python--day5
    Python—day3
    Windows10 安装QT问题
  • 原文地址:https://www.cnblogs.com/hanxing/p/4191315.html
Copyright © 2020-2023  润新知