ChinaUnix.net
相关文章推荐:

return是什么意思

RT! 有点习惯这种写法但是还不知道怎么回事。求指点!!!! #!/usr/bin/perl use strict; use warnings; main(@ARGV); sub main { open FH,"linesfile.txt"; my $linenum=1; while(my $line=){ print "line $linenum is ".$line; $linenum++; } close FH; message("this"); } sub message { my $m=shift or return; print ("$m\n"); }

by laohuanggua - Perl - 2010-10-05 23:57:30 阅读(2838) 回复(4)

相关讨论

我只知道默认的三个动作:REJECT DROP ACCEPT 刚刚看防火墙脚本时看到有return的,不知是何意,哪位能够给我解释一下吗? 非常感谢!

by lichin - 网络与硬件 - 2004-06-19 16:59:05 阅读(772) 回复(1)

我只知道默认的三个动作:REJECT DROP ACCEPT 刚刚看防火墙脚本时看到有return的,不知是何意,哪位能够给我解释一下吗? 非常感谢!

by lichin - Linux系统管理 - 2004-06-19 16:59:05 阅读(5439) 回复(1)

sub outer { my $x = $_[0] + 35; local *inner = sub { return $x * 19}; return $x + inner(); } 骆驼书上有这么个例子定义了一个嵌套的子过程。 请问: local *inner = sub { return $x * 19}; 这句话是什么意思? 为什么是 *inner ?

by ccc77 - Perl - 2010-02-27 11:35:58 阅读(865) 回复(0)

如题,例如:[code]static void * threadFunc(void *arg) { int loops = *((int *) arg); int loc, j, s; for (j = 0; j < loops; j++) { s = pthread_mutex_lock(&mtx); if (s != 0) errExitEN(s, "pthread_mutex_lock"); loc = glob; loc++; glob = loc; s = pthread_mutex_unlock(&mtx); if (s != 0) errExitEN(s, "pthread_m...

by superwujc - C/C++ - 2013-03-25 16:08:46 阅读(3380) 回复(4)

一段存储过程语句,不理解的是return 1,return 2,return 3在语句中有什么作用啊 if(select 是否借出 from Books where 图书编号=@BookID)=1 begin print\'图书已借出,不能借\' return 1 end if(@BorrowNum>=@BorrowDureNum) begin print\'借书数量已满,不能再借\' return 2 end if exists (select * from Borrow where 读者编号=@ReaderID and datediff(day,应还日期,getdate())>0) begin print\'有过期未还图书,不能借\' r...

by cysccnu - SQL server - 2008-03-12 09:58:10 阅读(3158) 回复(3)

VI /etc/nsswitch.nis hosts: nis [NOTFOUND=return] files

by 在线急等待! - Solaris - 2007-04-02 23:15:00 阅读(1302) 回复(3)

VI /etc/nsswitch.nis\r\n\r\nhosts: nis [NOTFOUND=return] files

by 在线急等待! - Solaris - 2007-04-02 23:15:00 阅读(3182) 回复(3)

请问大家return 在shell里的作用是什么,好像不能返回具体值的吧?

by hxl - Shell - 2012-03-12 08:14:22 阅读(7780) 回复(17)

static int sn_reserve (struct state *state, size_t n) { return state->;s + n >; state->;theend; } 其中state机构体定义如下: struct state { unsigned char *str; unsigned char *s; unsigned char *theend; size_t sz; size_t max_sz; int (*append_char)(struct state *, unsigned char); int (*reserve)(struct state *, size_t); /* XXX - methods */ };

by agchen - C/C++ - 2004-10-18 10:09:14 阅读(1084) 回复(5)

Installation of 112922-02 failed. return code 2. Installing 112904-09... Installation of 112904-09 failed. return code 2. Installing 114375-06... Installation of 114375-06 failed. return code 2. Installing 113574-03... Installation of 113574-03 failed. return code 2. Installing 112925-03... Installing 112923-03... Installing 112921-02... Installing 114127-01... Installation of 114127-01 fa...

by zbf - Solaris - 2003-12-11 12:05:35 阅读(829) 回复(0)