Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #404145

Re: p = {1,0,0}

From fir <profesor.fir@gmail.com>
Newsgroups comp.lang.c
Subject Re: p = {1,0,0}
Date 2026-11-08 04:17 +0100
Organization A noiseless patient Spider
Message-ID <11copjm$nn1$1@dont-email.me> (permalink)
References (11 earlier) <11cd05l$3t1er$1@dont-email.me> <11cd0q3$3ta28$1@dont-email.me> <11cd1vs$3tpfp$1@dont-email.me> <11cntae$3nme2$1@dont-email.me> <11co83c$3rmef$1@dont-email.me>

Show all headers | View raw


bartc pisze:
> On 07/11/2026 19:14, fir wrote:
>> bartc pisze:
>>>>
>>>>
>>>> there is also option
>>>>
>>>> int rand { rand = rand()}
>>>
>>> Which means...?
>>
>> check also this you got
>>   a structure module
>>
>> some
>> {
>>    int x;
>> }
>>
>>
>> some is structure but also may be use as 'type'
> 
> Well, those are the same thing.
> 
>>
>> main()
>> {
>>    some;
> 
> Stop: what have you just declared here?
> 
>>     some.x = 10;
> 
> So now 'some' is a variable of type 'some'?
> 
> This is either nonsensical, or you've left something out or mixed 
> something up.
> 
> 


well saying some is type is some kind of shortcut

i mean its like int is type in such expressions like

int a,b,c ;

some a,b,c

some is like int its genarally an extended structure who is also a 
function (can be called)  and module (may have defined functions and 
fields in it) , a 'type' (can be used to 'declare' entities) and 
namespace (can be used to import symbols like namespace), and also as 
builti type like int (comes with operators like int)

in short simplest is to think it as an extended structure probably

i said its 'type' coz it describes 'type' of given extended structure 
and may be used to 'declare' clones of it but its not strictly a type

here some work like int

some a, b, c;  //declarations (?)

int a,b, c; //declarations

but also may be used anonymous way


some;  //'anonymous' declaration


if some is

some
{
  int x;
}


then

some a,b,c;

you may use a.x = 2, b.x=3


and in case of

some;

you can use some.x

im strictly not 100% sure it should work this 'dychotomic' way
but im presently closer to the opinion it should, than to opinion it 
shouldnt


instead of naming some type maybe i should name it as prototype,
(which probably has much more sense )
im not sure but i heard once that there are languages who use prototypes
instead of types and maybe it is something like that here too , i dont 
know (never checked this topic)

so if some is extended structure you may just make arrays of it


some[20]   //aray of 20 somes

some[20] a //array of 30 somes named a
some b[]   //array of 20 somes named b[]


(also im not sure as this dychotomy if it should go b
possibly... it may have soem advantage like a
may define a functions that work on array and b
defines functions whose only work on ba and you got array of it
though im not yet strictly sure how to use this potential dichotomy

eventually in simple case they are both an array of somes making some 
newsome and rules of some fit here,

the most basic is obviously

some[20]{
int a ,b,c
}
   //array of 20 extended structures some contaiing int a,b,c each







>>    some a,b,c;
>>
>>     a.x = 10 ;
>>
>> }
>>
>> now get an array of some
>>
>> some[Y][X];
>>
>> all a function part to it
>>
>> some[Y][X] (int v)
> 
> So, what is 'some' /now/?! Is is a function, type or variable? You know 
> it would be very easy to explain.
> 
>> {
>>    int val;
>>
>>   for (int j=0; j<Y; j++}
>>   for (int i=0; i<X; i++}
>>   {
>>     some[j][i].val = v;
>>   }
>>
>> }
> 
> How does this code get invoked?
> 
>>
>> some[100][100](3);
>>
>> //creates table of 100x100 of some and calls on it so it feels up with 3
> 
> OK. So you're calling a typespec.
> 
> 
> Oh, I give up.
> 
> 

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-01 14:32 +0100
  Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-01 13:41 +0000
    Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-01 15:10 +0100
      Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-01 16:13 +0100
        Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-02 16:46 +0100
    Re: p = {1,0,0} David Brown <david.brown@hesbynett.no> - 2026-11-02 17:36 +0100
      Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-02 18:47 +0000
        Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-02 20:54 +0100
          Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-02 20:56 +0100
        Re: p = {1,0,0} David Brown <david.brown@hesbynett.no> - 2026-11-02 21:29 +0100
          Re: p = {1,0,0} Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-11-02 21:39 +0100
          Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-02 22:58 +0000
            Re: p = {1,0,0} David Brown <david.brown@hesbynett.no> - 2026-11-03 11:09 +0100
            Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 13:19 +0100
              Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-03 14:07 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 15:45 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 15:54 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 16:48 +0100
            Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 14:29 +0100
              Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 14:42 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 16:09 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 16:18 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 16:38 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 16:55 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 17:06 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-03 16:26 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 17:34 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 17:47 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 17:54 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 22:08 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-04 14:14 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-04 14:27 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-05 19:10 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-05 19:38 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-07 20:14 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-07 20:18 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-07 20:19 +0100
                Re: p = {1,0,0} Richard Harnden <richard.nospam@gmail.invalid> - 2026-11-08 09:29 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-07 20:24 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-07 20:26 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-07 22:18 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 04:17 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-07 20:50 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-07 22:23 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 04:20 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 04:36 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 04:46 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 16:20 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-08 17:18 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 19:17 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 19:36 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 19:41 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-08 11:19 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 12:44 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 12:56 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 13:12 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-08 16:12 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-09 23:47 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-09 23:56 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-10 01:11 +0000
                Re: p = {1,0,0} David Brown <david.brown@hesbynett.no> - 2026-11-10 09:24 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-10 12:08 +0000
                Re: p = {1,0,0} David Brown <david.brown@hesbynett.no> - 2026-11-10 13:50 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-10 13:53 +0000
                while() and do/while() Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-11-10 11:47 -0800
                Re: while() and do/while() bartc <bc@freeuk.com> - 2026-11-10 20:33 +0000
                Re: p = {1,0,0} Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-11-10 04:29 -0800
                Re: p = {1,0,0} David Brown <david.brown@hesbynett.no> - 2026-11-10 13:57 +0100
                Re: p = {1,0,0} Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-11-10 08:57 -0800
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 13:51 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 14:08 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 14:17 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 14:22 +0100
                Re: p = {1,0,0} bartc <bc@freeuk.com> - 2026-11-10 14:27 +0000
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:32 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:44 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:51 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 16:10 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 16:24 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 16:38 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 16:54 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 17:09 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 17:16 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 17:20 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:09 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:13 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:17 +0100
                Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-10 15:24 +0100
      Re: p = {1,0,0} Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-11-02 14:52 -0800
        Re: p = {1,0,0} fir <profesor.fir@gmail.com> - 2026-11-03 13:29 +0100

csiph-web