TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: john j dumas
from: Bill Birrell
date: 2004-03-09 23:15:00
subject: [C] Return statement

> How is the return statement organized so that it does
 > not need parentheses?

 > return 1;  // works

    return (1); /* also works :-) */

    Parenthesis can nearly always be used where they are not actually
needed in C. :-)

    return is a keyword, so it has higher precedence than a function. It
does not require brackets for its return value. It does not even require a
value to return, but if provided with one it returns this value to the
calling function.

Best Wishes,
Bill.

---
* Origin: Escan BBS (2:25/200)
SEEN-BY: 633/267 270
@PATH: 25/200 108 252/110 250/501 140/1 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™.