亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2725 | 回復(fù): 3
打印 上一主題 下一主題

懇請大神來解釋一下! [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2014-12-05 16:05 |只看該作者 |倒序瀏覽
這是程序
當(dāng)子程序中的print禁止的時候,結(jié)果如圖
當(dāng)子程序中的Print輸出的時候,結(jié)果如圖
請問$result結(jié)果為什么會有不同?

論壇徽章:
6
卯兔
日期:2013-11-26 14:52:02丑牛
日期:2014-02-19 18:01:25卯兔
日期:2014-05-20 20:34:06白羊座
日期:2014-05-23 13:39:232015亞冠之大阪鋼巴
日期:2015-08-07 20:57:582015亞冠之大阪鋼巴
日期:2015-09-02 14:09:09
2 [報告]
發(fā)表于 2014-12-05 18:17 |只看該作者
lz你要明白函數(shù)的返回值是什么,如果函數(shù)里面沒有return,是返回最后一行作為返回值
注釋掉print時,return $i=120,
沒注釋print時,reurn (print xxxx),是scalar,值為1

The return value of the subroutine (or of any other block, for that matter) is the
value of the last expression evaluated. Or, you may use an explicit return state-
ment to specify the return value and exit the subroutine from any point in the
subroutine. Either way, as the subroutine is called in a scalar or list context, so
also is the final expression of the routine evaluated in that same scalar or list
context


回復(fù) 1# yxmingliang


   

論壇徽章:
7
巳蛇
日期:2013-11-28 09:22:59天秤座
日期:2014-10-25 15:40:452015年辭舊歲徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:53:172015亞冠之德黑蘭石油
日期:2015-07-15 08:46:452015亞冠之平陽省
日期:2015-11-08 16:27:53白銀圣斗士
日期:2015-11-14 09:58:12
3 [報告]
發(fā)表于 2014-12-05 20:27 |只看該作者
回復(fù) 2# 只是一個紅薯


    此樓正解。!

論壇徽章:
0
4 [報告]
發(fā)表于 2014-12-05 21:18 |只看該作者
請問返回值為什么是1呢?是表示true么?回復(fù) 2# 只是一個紅薯


   
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP