| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | [C] Return statement |
From: "Kurt Kuzba"
From: john j dumas
JD> How is the return statement organized so that it does
JD> not need parentheses?
JD> return 1; // works
You said it yourself. It is a statement, and not a function.
char *MyString;
This does not need parentheses either.
default: break;
Nor does this.
The return statement does not accept arguments. The value given
becomes the value of the function itself, like an assignment.
int main(void)
{
return 0;
}
No matter what else I do in main(), the only thing any calling
function will see boils down to
int main=0;
Return assigns the value given to whatever register is used for
passing an integer or long integer value in whatever given
platform on which the C language is implemented. Or I could be
entirely wrong. I'm just making things up now.
> kkuzba{at}centurytel.net http://home.centurytel.net/kkuzba
> That which has no substance enters where there is no space.
> (Tao Te Ching #43)
--- BBBS/LiI v4.01 Flag-5
* Origin: Prism's_Point (1:261/38.1)SEEN-BY: 633/267 270 @PATH: 261/38 123/500 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.