🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1387

Re: p = {1,0,0}

#1387
From: fir
Date: Sun, 08 Nov 2026 18:36
201 lines
6566 bytes
fir pisze:
> bartc pisze:
>> On 08/11/2026 15:20, fir wrote:
>>> fir pisze:
>>>> fir pisze:
>>>>> fir pisze:
>>>>>>
>>>>>> No, try it like this first:
>>>>>>
>>>>>>     int A() {B = C()}
>>>>>
>>>>> no this should be
>>>>>
>>>>>    int A() {A = C()}
>>>>>
>>>>> now its ok
>>>>>
>>>>> if
>>>>>
>>>>> C(){2}  //in clasic c its colose to int C() {return 2}
>>>>>
>>>>>
>>>>> then
>>>>>
>>>>> A()
>>>>>
>>>>> calls C() and assigns 2 to A so A is 2 now
>>>>>
>>>>> or take it
>>>>>
>>>>>   int A(int B) {A = C()*B}
>>>>>
>>>>> A(3) assigns 6 to a so
>>>>>
>>>>>
>>>>> main:
>>>>>
>>>>>
>>>>> C{2} //modue with value 2
>>>>>
>>>>> int A(int B) {A = C()*B}  //module A definition
>>>>>
>>>>> A(10)  //asigns  20 to A
>>>>>
>>>>> int X = A*A;  //assigns 400 to X
>>>>>
>>>>>
>>>>
>>>> if you dont understand it its like
>>>>
>>>>     sinf(); ///calls sinf() function but the result is not 
>>>> 'returned' but its a float named sinf
>>>>
>>>>
>>>> sou you can
>>>>     sinf(1.22);
>>>>
>>>> float a = sinf*20;
>>>>
>>>>
>>>> and in sinf definition you use this syntax
>>>>
>>>> float sinf(float a)
>>>> {
>>>>      //do calculations here
>>>>
>>>>      sinf = //..... result
>>>> }
>>>>
>>>> so
>>>>
>>>> int rand { rand = clib_rand()}
>>>>
>>>> then rand() //cals rand
>>>>
>>>> a = rand*rand  //uses value (witthout calling
>>
>>     int randv;
>>
>>     int randf() {
>>         randv = rand();   // from stdlib.h
>>     }
>>
>>     randf();              // calls rand and store in randv
>>
>>     a = randv*randv;      // uses value without calling
>>
>> So this is nothing that can't be done now and much more clearly.
>>
>>>>>
>>>
>>> here above you could
>>>
>>>  > a = rand()*rand
>>>
>>> calls rand and squares it //like 22*22
>>
>> OK, so:
>>
>>     a = rand()**2;
>>
>> C doesn't have '**' now, but this is much more useful and general 
>> purpose extension. Or you can emulate it:
>>
>>     int sqrint(int a) { return a * a;}
>>
>>     a = sqrint(rand());
>>
>> Again, this can be done right now.
>>
>>>
>>> a = rand()*rand()
>>>
>>> calls rand twice //like 348*982
>>>
>>> a = rand*rand() //uses previous rand and calls rand //like 982 *1342
>>>
>>> all this sintax is much more capacious so you could write more heavy 
>>> (condensed) code
>>
>> Is that supposed to be good, or bad?
>>
>> If less syntax is used it should be because of true simplicity not 
>> because due to an incomprehensible set of language rules.
>>
> 
> you could say the same when you learned c first time
> 
> in fact learning this above is like learning c first time, you should be 
> happy
> 
> it also shows that oryginal c and those upbildings are close, its close 
> feeling of having more c in c
> 
> ofc the fact you can write more heavy C is considereg good -
> it is considered very good
> 
> i probbaly could find more examles of this heavier c be heavier
> (thus shorted) than oryginal c but i would probbaly be in mood to think up
> examples...you may also try yourself
> 
> (i will tray to give such examples but in some future yet not
> know when i will be in proper mood .. right now im feeling a bit tired 
> ans sleepy ;c)
> 

(side note)

besides im happy with all that yet becouse other reasons ,

it SHOWS interesting things, and it RESOLVES some things

for example as you maybe noticed if rear wat was written that

if some have

foo(){

}

it SHOWS that in definition those () could be ommited


foo{
  printf("dsadsad");
}

when you call you still need foo(), but not in definition


its true - and i not saing that - that was a 'result'
it also byt resolves a thing what such foo {} should be (which was a 
HARD HARD questions back then)

i like such cases when things answers themselves... its also some form 
of acknovledgment things are done good here when things answers themselves


(end of side note)


some can also be said on word declaration becouse now that word
like has o sense probebly you got definition and you got something like 
"first appearance" or maybe "include" ? instead of declaration

also such form is generally nice

foo{
   aaa{
     bb{}
    }
   zoo{}
booo{}
}


what is this? functions containing functions and at onece 
modules/structures containing structures depending if you put data 
inside or code inside

its answered itself so it can be said its answered (what it is)
Technical Details
Message-ID: <11cqffn$jk1j$1@dont-email.me>
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!.POSTED!not-for-mail
References: <11c7f1j$20b9h$1@dont-email.me> <11c7fj6$20gab$1@dont-email.me> <11cae5m$318tq$1@dont-email.me> <11calrt$34gq3$1@dont-email.me> <11carqs$36m0o$1@dont-email.me> <11cb4hs$3a13l$1@dont-email.me> <11ccnkq$3pjhd$1@dont-email.me> <11ccobd$3ps4l$1@dont-email.me> <11cctee$3rtjh$1@dont-email.me> <11ccu0t$3s54f$1@dont-email.me> <11ccv4n$3sjn5$1@dont-email.me> <11cd05l$3t1er$1@dont-email.me> <11cd0q3$3ta28$1@dont-email.me> <11cd1vs$3tpfp$1@dont-email.me> <11cnve1$3ofei$1@dont-email.me> <11co8d4$3rpvm$1@dont-email.me> <14be9ea5-918f-5871-1bba-11e29e6e25d5@gmail.com> <11coqot$1236$1@dont-email.me> <11corb2$16dk$1@dont-email.me> <11cq3vh$dtdn$1@dont-email.me> <11cqasq$ho0h$1@dont-email.me> <11cqebf$j5nv$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!.POSTED!not-for-mail
From: fir <profesor.fir@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: p = {1,0,0}
Date: Sun, 8 Nov 2026 19:36:26 +0100
Organization: A noiseless patient Spider
Lines: 201
Message-ID: <11cqffn$jk1j$1@dont-email.me>
References: <11c7f1j$20b9h$1@dont-email.me> <11c7fj6$20gab$1@dont-email.me>
 <11cae5m$318tq$1@dont-email.me> <11calrt$34gq3$1@dont-email.me>
 <11carqs$36m0o$1@dont-email.me> <11cb4hs$3a13l$1@dont-email.me>
 <11ccnkq$3pjhd$1@dont-email.me> <11ccobd$3ps4l$1@dont-email.me>
 <11cctee$3rtjh$1@dont-email.me> <11ccu0t$3s54f$1@dont-email.me>
 <11ccv4n$3sjn5$1@dont-email.me> <11cd05l$3t1er$1@dont-email.me>
 <11cd0q3$3ta28$1@dont-email.me> <11cd1vs$3tpfp$1@dont-email.me>
 <11cnve1$3ofei$1@dont-email.me> <11co8d4$3rpvm$1@dont-email.me>
 <14be9ea5-918f-5871-1bba-11e29e6e25d5@gmail.com>
 <11coqot$1236$1@dont-email.me> <11corb2$16dk$1@dont-email.me>
 <11cq3vh$dtdn$1@dont-email.me> <11cqasq$ho0h$1@dont-email.me>
 <11cqebf$j5nv$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 08 Nov 2026 18:36:40 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="643123"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/F82LH7mu4y13dNKd/JdGqDaeLGle7aAA="; posting-host="9324e5ef4bfce41eb124a57241b8befc"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101
 Firefox/140.0 SeaMonkey/2.53.24
Cancel-Lock: sha1:sz6P2YtLflSO/NNnnCI0GUJeuV0= sha256:NNvIz9Pb2x7m/Ar7Ue/wEXg+prvVul/rzUrbHoOsYDU=
	sha1:ZHTfQTm+63WK2W9bnc2b3DGjgvM= sha256:njkmx+n9+Q3FKVAOhW7JeQyH4pW1b+HWkal6dWCLw3g=
In-Reply-To: <11cqebf$j5nv$1@dont-email.me>