🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1278

Re: p = {1,0,0}

#1278
From: Keith Thompson
Date: Mon, 02 Nov 2026 22:52
14 lines
1835 bytes
David Brown <david.brown@hesbynett.no> writes:
[...]
> In C, you need to give a type to "{ 10, 20 }" - as you did here,
> making it into a compound literal.  The expression "{ 10, 20 }" on its
> own cannot be used for assignment to "s" because the type of an
> expression must be determined from the expression alone - not from
> what you are assigning it to.

In fact `{ 10, 20 }` is not an expression at all.  It's a valid
initializer and it can be part of an expression (a compound literal).

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Technical Details
Message-ID: <11cb47l$39nj8$1@kst.eternal-september.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!kst.eternal-september.org!.POSTED!not-for-mail
References: <11c7f1j$20b9h$1@dont-email.me> <11c7fj6$20gab$1@dont-email.me> <11cae5m$318tq$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!kst.eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: p = {1,0,0}
Date: Mon, 02 Nov 2026 14:52:37 -0800
Organization: None to speak of
Lines: 14
Message-ID: <11cb47l$39nj8$1@kst.eternal-september.org>
References: <11c7f1j$20b9h$1@dont-email.me> <11c7fj6$20gab$1@dont-email.me>
	<11cae5m$318tq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Mon, 02 Nov 2026 22:52:37 +0000 (UTC)
Injection-Info: kst.eternal-september.org;
	logging-data="3464808"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX190w5CjPr+3lQ67CCJM/vRp"; posting-host="b2b9691d5f86313d524e66216e8e116e"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:8Kffi9ZjCk0wVjKAT1L0MhJDh+Y= sha256:vyuNEtQD8xdGq18Rylz9V3Wk4jhG3U9HI71aSF4yNQ0=
	sha1:4IVmNKO2UlV0CTHdcMLttUqfmHs= sha256:TNNqC3bTsEsxJrW70lvNyJmEv5Rm6aJqfZ5TMQ0uwoM=