Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: gah4 Newsgroups: comp.compilers Subject: Re: What is the meaning of an expression? Date: Fri, 14 Jan 2022 17:58:01 -0800 (PST) Organization: Compilers Central Lines: 22 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-01-056@comp.compilers> References: <22-01-052@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="12461"; mail-complaints-to="abuse@iecc.com" Keywords: semantics Posted-Date: 14 Jan 2022 21:23:50 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <22-01-052@comp.compilers> Xref: csiph.com comp.compilers:2832 On Friday, January 14, 2022 at 9:40:24 AM UTC-8, Roger L Costello wrote: > Hello Compiler Experts! > In some book I read this statement: > The meaning of an expression is > the value of the expression. I think that is wrong. C is a little strange as languages go, but you can have an expression statement like: 1 + 1 which says to add one and one, and then ignore the result. It has a value, but no meaning. I suspect most compilers won't even do it, but I never looked. More common is a function call with side effects, and ignore the value. printf("Hi there!"); is an expression with the value ignored, but with a meaning.