Jump to content

Talk:Expression (computer science)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by The Transhumanist (talk | contribs) at 01:03, 10 April 2012 (add Perl WikiProject banner using AWB). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconPerl (inactive)
WikiProject iconThis article is within the scope of WikiProject Perl, a project which is currently considered to be inactive.

Void expressions

It is reported for the C language that a syntactically correct function call is an expression too unless the function has void return type.

This is incorrect (the citation is a 404 page anyway). In C, and I assume most C-derived languages, a syntactically-correct function call to a function with void return type is a valid expression. The expression has type "void" and evaluates to a valid value, "the void value", and there are special limitations on what you can do with a value of type "void" -- basically you can cast it to void, and just about everything else is disallowed. But it is a valid expression and a valid value. See ISO/IEC 9899:1999 section 6.3.2.2 (void). Hence I am changing the article. --EatMyShortz (talk) 11:47, 31 August 2009 (UTC)[reply]