为什么编译器不抱怨没有返回结果的函数? [英] Why doesn't the compiler complain about functions that don't return a result?
问题描述
在VB6中它是愚蠢的,它今天仍然是愚蠢的......或者我是愚蠢的?
-
Andrew J马歇尔
MCP(Visual Basic)
费尔法克斯,弗吉尼亚州
It was dumb in VB6 and it''s still dumb today ... or am I the dumb one?
--
Andrew J. Marshall
MCP (Visual Basic)
Fairfax, VA
推荐答案
呃安德鲁。 ..
你能发一个简短的例子吗?
" Andrew J. Marshall" <安************* @ ObjectVision.netANTISPAMDEVICE>在消息新闻中写了
:eO ************* @ TK2MSFTNGP11.phx.gbl ...
Uhhh Andrew...
Can you post a short example?
"Andrew J. Marshall" <An*************@ObjectVision.netANTISPAMDEVICE> wrote
in message news:eO*************@TK2MSFTNGP11.phx.gbl...
在VB6中它是愚蠢的今天它仍然愚蠢......或者我是笨蛋?
-
Andrew J. Marshall
MCP(Visual Basic)
费尔法克斯, VA
It was dumb in VB6 and it''s still dumb today ... or am I the dumb one?
--
Andrew J. Marshall
MCP (Visual Basic)
Fairfax, VA
*" Andrew J. Marshall" <安************* @ ObjectVision.netANTISPAMDEVICE> scripsit:
* "Andrew J. Marshall" <An*************@ObjectVision.netANTISPAMDEVICE> scripsit:
它在VB6中是愚蠢的,它今天仍然是愚蠢的......或者我是笨蛋?
It was dumb in VB6 and it''s still dumb today ... or am I the dumb one?
数据类型的默认值将被返回,这就是为什么没有编译
时间错误显示的原因。
-
Herfried K. Wagner [MVP]
< http://www.mvps.org/dotnet>
The datatype''s default value will be returned, that''s why no compile
time error is shown.
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
" Andrew J马歇尔 < An ************* @ ObjectVision.netANTISPAMDEVICE>
schrieb
"Andrew J. Marshall" <An*************@ObjectVision.netANTISPAMDEVICE>
schrieb
在VB6中它是愚蠢的,它仍然是愚蠢的今天......还是我是笨蛋?
It was dumb in VB6 and it''s still dumb today ... or am I the dumb
one?
如果总是返回结果,那么没有理由抱怨。如果你没有
指定返回值,返回数据类型的默认值是
返回。
-
Armin
如何报价以及原因:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
If always returns a result so there is no reason to complain. If you don''t
specify the return value, the default value of the return data type is
returned.
--
Armin
How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
>
这篇关于为什么编译器不抱怨没有返回结果的函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!