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


Groups > comp.lang.c > #403919 > unrolled thread

p = {1,0,0}

Started byfir <profesor.fir@gmail.com>
First post2026-11-01 14:32 +0100
Last post2026-11-03 13:29 +0100
Articles 20 on this page of 90 — 7 participants

Back to article view | Back to comp.lang.c


Contents

  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

Page 3 of 5 — ← Prev page 1 2 [3] 4 5  Next page →


#404140

Frombartc <bc@freeuk.com>
Date2026-11-07 22:18 +0000
Message-ID<11co83c$3rmef$1@dont-email.me>
In reply to#404131
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.


>    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.

[toc] | [prev] | [next] | [standalone]


#404145

Fromfir <profesor.fir@gmail.com>
Date2026-11-08 04:17 +0100
Message-ID<11copjm$nn1$1@dont-email.me>
In reply to#404140
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.
> 
> 

[toc] | [prev] | [next] | [standalone]


#404137

Fromfir <profesor.fir@gmail.com>
Date2026-11-07 20:50 +0100
Message-ID<11cnve1$3ofei$1@dont-email.me>
In reply to#404038
bartc pisze:
>>
>> there is also option
>>
>> int rand { rand = rand()}
> 
> Which means...?

ofc some could also write

int rand() { rand = rand()}

then its maybe easier to understtod..

note its not a function rand() that returns int its a module-function 
rand tthat contains/covers int

i moit those empty () for function modules becouse they are not needed like

some {printf("\n elo";) }

at definitions they are not needed but on execution /clien site

some() mean execute the code in some where

some;

means give the value of some (also include namespace if frst time)



[toc] | [prev] | [next] | [standalone]


#404141

Frombartc <bc@freeuk.com>
Date2026-11-07 22:23 +0000
Message-ID<11co8d4$3rpvm$1@dont-email.me>
In reply to#404137
On 07/11/2026 19:50, fir wrote:
> bartc pisze:
>>>
>>> there is also option
>>>
>>> int rand { rand = rand()}
>>
>> Which means...?
> 
> ofc some could also write
> 
> int rand() { rand = rand()}

One could also avoid using the same identifier for three different things!

I assume that last 'rand' is calling some external function, but that is 
going to be shadowed by at least that first 'rand' and possibly the second.

> 
> then its maybe easier to understtod..


No, try it like this first:

   int A() {B = C()}

Although that will only fix one puzzle out of many.


> note its not a function rand() that returns int its a module-function 
> rand tthat contains/covers int
> 
> i moit those empty () for function modules becouse they are not needed like
> 
> some {printf("\n elo";) }


'some' seems to be a refugee from your other post. It's not defined here 
anyway.

[toc] | [prev] | [next] | [standalone]


#404146

Fromfir <profesor.fir@gmail.com>
Date2026-11-08 04:20 +0100
Message-ID<14be9ea5-918f-5871-1bba-11e29e6e25d5@gmail.com>
In reply to#404141
bartc pisze:
> On 07/11/2026 19:50, fir wrote:
>> bartc pisze:
>>>>
>>>> there is also option
>>>>
>>>> int rand { rand = rand()}
>>>
>>> Which means...?
>>
>> ofc some could also write
>>
>> int rand() { rand = rand()}
> 
> One could also avoid using the same identifier for three different things!
> 

for two different first two are the same (its definition of local 
extended structure rand)..  the third indeed is rand from clib

its easier to think some is extended structure nearly all in Ↄ is 
extended structure (but also may name it as module or entity, too)
> I assume that last 'rand' is calling some external function, but that is 
> going to be shadowed by at least that first 'rand' and possibly the second.
> 
>>
>> then its maybe easier to understtod..
> 
> 
> No, try it like this first:
> 
>    int A() {B = C()}
> 
> Although that will only fix one puzzle out of many.
> 
> 
>> note its not a function rand() that returns int its a module-function 
>> rand tthat contains/covers int
>>
>> i moit those empty () for function modules becouse they are not needed 
>> like
>>
>> some {printf("\n elo";) }
> 
> 
> 'some' seems to be a refugee from your other post. It's not defined here 
> anyway.
> 
> 

[toc] | [prev] | [next] | [standalone]


#404147

Fromfir <profesor.fir@gmail.com>
Date2026-11-08 04:36 +0100
Message-ID<11coqot$1236$1@dont-email.me>
In reply to#404146
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



in fact tha call C() is ignored as there is no code to execute in C  but 
C value is taken


[toc] | [prev] | [next] | [standalone]


#404148

Fromfir <profesor.fir@gmail.com>
Date2026-11-08 04:46 +0100
Message-ID<11corb2$16dk$1@dont-email.me>
In reply to#404147
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
> 
> in fact tha call C() is ignored as there is no code to execute in C  but 
> C value is taken
> 
> 
> 

[toc] | [prev] | [next] | [standalone]


#404156

Fromfir <profesor.fir@gmail.com>
Date2026-11-08 16:20 +0100
Message-ID<11cq3vh$dtdn$1@dont-email.me>
In reply to#404148
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
>>

here above you could

 > a = rand()*rand

calls rand and squares it //like 22*22


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


>> in fact tha call C() is ignored as there is no code to execute in C  
>> but C value is taken
>>
>>
>>
> 

[toc] | [prev] | [next] | [standalone]


#404157

Frombartc <bc@freeuk.com>
Date2026-11-08 17:18 +0000
Message-ID<11cqasq$ho0h$1@dont-email.me>
In reply to#404156
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.

[toc] | [prev] | [next] | [standalone]


#404158

Fromfir <profesor.fir@gmail.com>
Date2026-11-08 19:17 +0100
Message-ID<11cqebf$j5nv$1@dont-email.me>
In reply to#404157
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)

[toc] | [prev] | [next] | [standalone]


#404159

Fromfir <profesor.fir@gmail.com>
Date2026-11-08 19:36 +0100
Message-ID<11cqffn$jk1j$1@dont-email.me>
In reply to#404158
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)

[toc] | [prev] | [next] | [standalone]


#404160

Fromfir <profesor.fir@gmail.com>
Date2026-11-08 19:41 +0100
Message-ID<11cqfod$jnkv$1@dont-email.me>
In reply to#404159
fir pisze:

> also such form is generally nice
> 
> foo{
>    aaa{
>      bb{}
>     }
>    zoo{}
> booo{}
> }
> 

and what it is in 'normal' c? i dont even know
> 
> 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)

[toc] | [prev] | [next] | [standalone]


#404151

Frombartc <bc@freeuk.com>
Date2026-11-08 11:19 +0000
Message-ID<11cplsf$8nc4$1@dont-email.me>
In reply to#404147
On 08/11/2026 03:36, fir wrote:
> 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}

So C is a function name, and 'C(){2}' (which seems to be something new) 
defines that function to return '2' with a type of 'int'?

> 
> then
> 
> A()
> 
> calls C() and assigns 2 to A so A is 2 now

And A is ... a variable? A function? An alias for function C? An alias 
for whatever C happens to return?

Forget C, this is one of best esolangs I've seen described. But this is 
the wrong forum for it.

> or take it
> 
>   int A(int B) {A = C()*B}
> 
> A(3) assigns 6 to a so

Are these higher-order functions, so that calling A() returns a new 
function (a closure in this case)?

In that case you're calling it wrong. You need:

     F = A(3)         # generate a new function equivalent to C()*3

     F()              # returns C()*3

But this is more interesting when F takes an argument too.

So you've just discovered functional programming. But then, most of this 
stuff I believe is already possible in C++, if you were to learn it 
properly.

[toc] | [prev] | [next] | [standalone]


#404152

Fromfir <profesor.fir@gmail.com>
Date2026-11-08 12:44 +0100
Message-ID<11cpnbb$97kp$1@dont-email.me>
In reply to#404151
bartc pisze:
> On 08/11/2026 03:36, fir wrote:
>> 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}
> 
> So C is a function name, and 'C(){2}' (which seems to be something new) 
> defines that function to return '2' with a type of 'int'?
> 

C ad A arestructures and functions  at once

C() {2}  (Or
C{2} is the same as you may skip () in definiton if they are empty)

you may both call or read its value


C(); ///you call it //it has no code so it do nothing

int a = C*C ; //you read it

now function not return values so if you call C code
it just sets the value of C which you may use and reuse but there is no 
return in this examples



>>
>> then
>>
>> A()
>>
>> calls C() and assigns 2 to A so A is 2 now
> 
> And A is ... a variable? A function? An alias for function C? An alias 
> for whatever C happens to return?
> 

A is both a function and a variable (structure/module)

its like say "int a" you know what int a is? but you mayy ad code to it

int a (int b) { a=2<<b }

now

a; //means you declare a (if first time in scope)

a(10); // means you declare and call, a(10) will set it to 1024

printf("%d",  a*3); //printfs 3072





> Forget C, this is one of best esolangs I've seen described. But this is 
> the wrong forum for it.
> 
>> or take it
>>
>>   int A(int B) {A = C()*B}
>>
>> A(3) assigns 6 to a so
> 
> Are these higher-order functions, so that calling A() returns a new 
> function (a closure in this case)?
> 
> In that case you're calling it wrong. You need:
> 
>      F = A(3)         # generate a new function equivalent to C()*3
> 
>      F()              # returns C()*3
> 
> But this is more interesting when F takes an argument too.
> 
> So you've just discovered functional programming. But then, most of this 
> stuff I believe is already possible in C++, if you were to learn it 
> properly.
> 


no i dont think so it has something to do with it it just a function 
calls involved

  int A(int B) {A = C()*B}

its like in classic c

int C() {return 2}

int A(int B)
{
   return C()*B;

}

the difference is you not return values but you assign it to A (which is 
like "int A" ) and then you may use A as int..also difference is you can 
do more here (on which i was writing a lot before)

[toc] | [prev] | [next] | [standalone]


#404153

Fromfir <profesor.fir@gmail.com>
Date2026-11-08 12:56 +0100
Message-ID<11cpo21$9fji$1@dont-email.me>
In reply to#404152
fir pisze:
>>
> 
> C ad A arestructures and functions  at once
> 
> C() {2}  (Or
> C{2} is the same as you may skip () in definiton if they are empty)


note normally it could be defined

int C() {C=2}


so now when you write

printf("%d", C*C);

then C may be not set it rather printf 0 or random stack value

but the

C{2}

is a nice shortcut also

those are all discovered ideas and some details i mat yet all change
as those dicoveries open some space for some decisions

[toc] | [prev] | [next] | [standalone]


#404154

Fromfir <profesor.fir@gmail.com>
Date2026-11-08 13:12 +0100
Message-ID<11cpov5$9q2h$1@dont-email.me>
In reply to#404153
fir pisze:
> fir pisze:
>>>
>>
>> C ad A arestructures and functions  at once
>>
>> C() {2}  (Or
>> C{2} is the same as you may skip () in definiton if they are empty)
> 
> 
> note normally it could be defined
> 
> int C() {C=2}
> 
> 
> so now when you write
> 
> printf("%d", C*C);
> 
> then C may be not set it rather printf 0 or random stack value
> 
> but the
> 
> C{2}
> 
> is a nice shortcut also
> 
> those are all discovered ideas and some details i mat yet all change
> as those dicoveries open some space for some decisions


I could say its not concise becuse say you got such

int C {clib_rand()}

now C() calls clib_rand() but discards a value
and C as value has unset int value even after C() call
(and its possibly somewhat good)

so

C{2} whan called C() should do nothing (ass calling 2; do nothing)
but as read should not have a value (not 2) but C{2} seem nice to have 
as 2 so maybe it needs to have some additional rules to define or change
the above

putting the rule that

C{} should have value of what inside has as value is not quite good 
becouse say

C(int i) {i++; i++; i++; i++; -1,0,-4}

would have 'volatile' value  like {2,3,4,5, -1,0,4}  which seem kinda 
nonsence (in some way)

i dont know maybe just code lines could be skipped so in the above
C has a value of {-1,0,4}

(and in those all things i wrote before it was kinda ssumed in facy 
(though in fact i was not considered constants there)




[toc] | [prev] | [next] | [standalone]


#404155

Fromfir <profesor.fir@gmail.com>
Date2026-11-08 16:12 +0100
Message-ID<11cq3hb$dnf9$1@dont-email.me>
In reply to#404154
fir pisze:
> fir pisze:
>> fir pisze:
>>>>
>>>
>>> C ad A arestructures and functions  at once
>>>
>>> C() {2}  (Or
>>> C{2} is the same as you may skip () in definiton if they are empty)
>>
>>
>> note normally it could be defined
>>
>> int C() {C=2}
>>
>>
>> so now when you write
>>
>> printf("%d", C*C);
>>
>> then C may be not set it rather printf 0 or random stack value
>>
>> but the
>>
>> C{2}
>>
>> is a nice shortcut also
>>
>> those are all discovered ideas and some details i mat yet all change
>> as those dicoveries open some space for some decisions
> 
> 
> I could say its not concise becuse say you got such
> 
> int C {clib_rand()}
> 
> now C() calls clib_rand() but discards a value
> and C as value has unset int value even after C() call
> (and its possibly somewhat good)
> 
one coud say that if

int a (int b)
{
    a = b;
}


is liek

"int a"(int b)

ile float f(int b)
is like "float f"(int b)

then

C(int a)

is like void C(int a)

thus C{2} is void C{2} then C shouul yeild to void
and thise are kinda rgiht arguments

but c is not only variable its alos a structure

C(int x)
{
   int a;
  int b;
  int c;
}


is like struct C {int a,b,c} so in this view c{2} is more like one 
element structure that contains 2 so probably c{2} is standable but this 
arguments above is to reember maybe

> so
> 
> C{2} whan called C() should do nothing (ass calling 2; do nothing)
> but as read should not have a value (not 2) but C{2} seem nice to have 
> as 2 so maybe it needs to have some additional rules to define or change
> the above
> 
> putting the rule that
> 
> C{} should have value of what inside has as value is not quite good 
> becouse say
> 
> C(int i) {i++; i++; i++; i++; -1,0,-4}
> 
> would have 'volatile' value  like {2,3,4,5, -1,0,4}  which seem kinda 
> nonsence (in some way)
> 
> i dont know maybe just code lines could be skipped so in the above
> C has a value of {-1,0,4}
> 
> (and in those all things i wrote before it was kinda ssumed in facy 
> (though in fact i was not considered constants there)
> 
> 
> 
> 
> 

[toc] | [prev] | [next] | [standalone]


#404168

Fromfir <profesor.fir@gmail.com>
Date2026-11-09 23:47 +0100
Message-ID<11ctijh$1mb1u$1@dont-email.me>
In reply to#404155
yet maybe some thoughts on for loop syntax potential improvements






im really annoyed by long c loops
like for(int i=0; i<100; i++) {}

back hen i miraculously mabe found some good alternative but it needs
unicode

100𝐢 {}  //is alternative for "for(int i=0; i<100; i++) {}"

it needs unicode becouse you will need tu use varable here
and if you use variable then normal i would be part of name of the variable

width𝐢 {} //bold or cursive (italics) for indexes

eventualy some culd use greek letters etc

Aψ tab[ψ]=9

(eventually though amybe less likely Aψ: tab[ψ]=9  )

lookin good but may have some drawbacks like its quite strong decision


overally i thinked what WOULD look the natural form of loop in c

in my mind appeared today some:


if f() is a function call then

f();f();f();f();f();f();f();f();

resembles loop thus

f()^10 may be understand as a kinda "natural" form of loop

so

int i =0; {a[i++]==0? break} ^ strlen(a);

might be seen as kinda natural
(probably thought here strlen would be called many tiles so maybe

int LEN = strlen(a);
int i =0; {a[i++]==0? break} ^ LEN;

its not bad still its a bit long, has no shorter form and also
there is a problem power has no leftsde form like 2^10 has not a form
"10th power of 2" though maybe some could vrite ^10 {2}

so some shortcut form i could consider

i^100 {tab[i]=0}

its not quite as natural as  {tab[i++]=0}^100 but maybe its standable as 
its based on idea of power and adds some to it

i even noticed this sole sign "^" could be read as "for"

i^100 would mean power given block  100 times and i treat as a number of 
this powering

i^10..99 { tab[i] = 0; }

( or { tab[i] = 0; } i^10..99 )



would then mean for i from 10 to 99 (inclusively)

im not sure if this is enough good but those  two syntaxes
(one using this unicode indexes in minimal form) and this based on
ascii is what i'm about currently

some could be worried that now this i as index is not an "int i"
only enigmatic i - but im not sure if such special thing as index of the 
loop (which is kinda low level thing should be necessary a clasical int 
i..maybe it shouldnt?

[toc] | [prev] | [next] | [standalone]


#404169

Fromfir <profesor.fir@gmail.com>
Date2026-11-09 23:56 +0100
Message-ID<11ctj47$1mfut$1@dont-email.me>
In reply to#404168
fir pisze:
> yet maybe some thoughts on for loop syntax potential improvements
> 
> 
> 
> 
> 
> 
> im really annoyed by long c loops
> like for(int i=0; i<100; i++) {}
> 
> back hen i miraculously mabe found some good alternative but it needs
> unicode
> 
> 100𝐢 {}  //is alternative for "for(int i=0; i<100; i++) {}"
> 
> it needs unicode becouse you will need tu use varable here
> and if you use variable then normal i would be part of name of the variable
> 
> width𝐢 {} //bold or cursive (italics) for indexes
> 
> eventualy some culd use greek letters etc
> 
> Aψ tab[ψ]=9
> 
> (eventually though amybe less likely Aψ: tab[ψ]=9  )
> 
> lookin good but may have some drawbacks like its quite strong decision
> 
> 
> overally i thinked what WOULD look the natural form of loop in c
> 
> in my mind appeared today some:
> 
> 
> if f() is a function call then
> 
> f();f();f();f();f();f();f();f();
> 
> resembles loop thus
> 
> f()^10 may be understand as a kinda "natural" form of loop
> 
> so
> 
> int i =0; {a[i++]==0? break} ^ strlen(a);
> 
> might be seen as kinda natural
> (probably thought here strlen would be called many tiles so maybe
> 
> int LEN = strlen(a);
> int i =0; {a[i++]==0? break} ^ LEN;
> 
> its not bad still its a bit long, has no shorter form and also
> there is a problem power has no leftsde form like 2^10 has not a form
> "10th power of 2" though maybe some could vrite ^10 {2}
> 
> so some shortcut form i could consider
> 
> i^100 {tab[i]=0}
> 

sorry i wrote i ^ 100 here my reader puts superscript here
if i would sue superscript then i would probably superscriopt whole 
"100i"  like {}"100i" not saying its a good idea ..though sometimes it 
seems interesting like tab[i++]^100 = 0 or matbe tab[i++]^100 = 
tab2[k--]^100 (it would be copying with reversing

overally this analogy using power as analogy fo r loop seems interesting

> its not quite as natural as  {tab[i++]=0}^100 but maybe its standable as 
> its based on idea of power and adds some to it
> 
> i even noticed this sole sign "^" could be read as "for"
> 
> i^100 would mean power given block  100 times and i treat as a number of 
> this powering
> 
> i^10..99 { tab[i] = 0; }
> 
> ( or { tab[i] = 0; } i^10..99 )
> 
> 
> 
> would then mean for i from 10 to 99 (inclusively)
> 
> im not sure if this is enough good but those  two syntaxes
> (one using this unicode indexes in minimal form) and this based on
> ascii is what i'm about currently
> 
> some could be worried that now this i as index is not an "int i"
> only enigmatic i - but im not sure if such special thing as index of the 
> loop (which is kinda low level thing should be necessary a clasical int 
> i..maybe it shouldnt?

[toc] | [prev] | [next] | [standalone]


#404172

Frombartc <bc@freeuk.com>
Date2026-11-10 01:11 +0000
Message-ID<11ctr0o$1or07$1@dont-email.me>
In reply to#404168
On 09/11/2026 22:47, fir wrote:
> yet maybe some thoughts on for loop syntax potential improvements
> 
> 
> 
> 
> 
> 
> im really annoyed by long c loops
> like for(int i=0; i<100; i++) {}

So am I.

> back hen i miraculously mabe found some good alternative but it needs
> unicode

But there are a million ways to have a shorter syntax without needing to 
resort to Unicode.

Have you looked at /any/ other at languages at all? Take some ideas from 
those.

> 100𝐢 {}  //is alternative for "for(int i=0; i<100; i++) {}"

   for i<100 {}

might do it too. But I'd prefer 'for i=0,100 {}'.

> if f() is a function call then
> 
> f();f();f();f();f();f();f();f();
> 
> resembles loop thus
> 
> f()^10 may be understand as a kinda "natural" form of loop
> 

So a repeat-N-times loop. Try ntimes 10 {}

> so
> 
> int i =0; {a[i++]==0? break} ^ strlen(a);
> 
> might be seen as kinda natural
> (probably thought here strlen would be called many tiles so maybe
> 
> int LEN = strlen(a);
> int i =0; {a[i++]==0? break} ^ LEN;

How you have a loop that iterates over 0 to LEN-1, and yet you still 
have a repeat-N-times loop and need to manually initialise and step the 
index?

Try the idea from above (upper limit is exclusive):

   for i=0,strlen(a) {a[i]==0 ? break}

(I won't comment on that ? construct.)


> its not bad still its a bit long, has no shorter form and also
> there is a problem power has no leftsde form like 2^10 has not a form
> "10th power of 2" though maybe some could vrite ^10 {2}
> 
> so some shortcut form i could consider
> 
> i^100 {tab[i]=0}

   for i=1,100 {tab[i]=0}


> its not quite as natural as  {tab[i++]=0}^100 but maybe its standable as 

What's natural about ^ meaning iteration? In C it means bitwise 
exclusive or. In other languages it might mean pow() or pointer deref.

(Remember your example above was f();f();f() not f()*f()*f().)

> its based on idea of power and adds some to it
> 
> i even noticed this sole sign "^" could be read as "for"
> 
> i^100 would mean power given block  100 times and i treat as a number of 
> this powering
> 
> i^10..99 { tab[i] = 0; }
> 
> ( or { tab[i] = 0; } i^10..99 )

  for i=10,100 {tab[i] = 0}

Everyone can see it is a for loop.


> 
> im not sure if this is enough good but those  two syntaxes
> (one using this unicode indexes in minimal form) and this based on
> ascii is what i'm about currently
> 
> some could be worried that now this i as index is not an "int i"
> only enigmatic i - but im not sure if such special thing as index of the 
> loop (which is kinda low level thing should be necessary a clasical int 
> i..maybe it shouldnt?

A loop index is definitely a thing, just not in C because it is so 
backward. Even Fortran had it in the 1950s:

    do x i=1,100                 # inclusive range

(x is a label for the end of the loop as it didn't have block syntax yet.)

[toc] | [prev] | [next] | [standalone]


Page 3 of 5 — ← Prev page 1 2 [3] 4 5  Next page →

Back to top | Article view | comp.lang.c


csiph-web