首页 > 代码库 > 空格和 空行
空格和 空行
function_name()
{
commands #缩进 缩进是空出四个空格
}
赋值 = 左右不能加空格 value=http://www.mamicode.com/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
空格和 空行
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。