Article View: comp.lang.c
Article #1412Re: p = {1,0,0}
From: fir
Date: Tue, 10 Nov 2026 12:51
Date: Tue, 10 Nov 2026 12:51
157 lines
5320 bytes
5320 bytes
bartc pisze:
>
> for i=1,100 {tab[i]=0}
>
>
this on i dont like better woud be imo
for i = 1 to 100 {tab[i]=0}
but still it feels too much basic
there are quite few subtle things here what given form gives what feelings
note in c that has no loop there is like no "natural" form of loop
(unles maybe just raw goto etc) at least i dont see it
this one wth power may be koncidered as somewhat natural
{ } ^ t
(note my rider turned some ^100 to superscripts when i posted post in
text i meant ^ 100 not superscripts (unless the last ones (tab[i++]
superscript 100)
i could made soem misteke coz when i consider
10 ^ t {} //read like 10 times "power" {} indexed by t
against
t ^ 10 {} //same
then the first one seems more appropriate
also
1..29 ^ t {}
a..b ^ i {}
imo this above is beter than
int i =a,b {} //<-- in this you take very rouhg (and) syntactic
decision imo (lk egeneralli a,b in c is considered like {a,b} so
it noramlly woud be {int i=a, b} tuple of things ..if no such thing as
i = {a, b} is not defined and if it looks liek it would like be defined
its definitely not like in for loop etc
the decisions behind
a..b ^ i {}
are imo quitte different and less colliding
(i know ^ is for xor etc, though i dont like tose bitwise operators as
thei are taken in c at allso, eventually some could substitute ^ with
something other its secondary
a..b @ i {}
(i slightly prefer here a..b ^ i {} right now but the exact symbol
choices can be deferred)
//i also konsidered
a..b {tab[%1]=k}
//%1 being replcement for i - but i has good tradition in c
// but maybe it could be also present as an alternative solution
so right now from those considerations the ground im standing
as to loops would be that
1..29𝐭{tab[𝐭]=9}
1..29 ^ t {tab[t]=9}
1..29 {tab[%1]=9}
// maybe 1..29 ^ {tab[%1]=9}
//maybe ^ t =1..29 {tab[%1]=9}
// alternatively {tab[%1]=9} ^ t= 1..76
//well in combination with power this assigment dont look bad here
maybe this also?
^ t=1..29 {tab[t]=9}
allows
^ t = {2,7,9,7,2,4,5} {f(t)}
//allows calls like f(2);f(7);f(9);f(7);f(2); f(4); f(5);
here this leftside form tooks weird more proper lik rightside
{ f(t)} ^ t = {2,7,9,7,2,4,5}
{ f(t)} ^ t = 2..50
overally not bad idea - power combined with those "value lists" either
a..b or {a,b,c}
//i put space among "^ t" artifically to editor not turn it in
superscript normally no space needed
maybe its even better than this unicode version
this may be also considered
T = {2,3,4,6} ;
foo(T);
normally it would just pass a tuple so maybe some operator for "pass
sequentially in time" is maybe needed
T = {2,3,4,6} ;
foo(::T);
foo(^{2,3,4,6});
i dont know somethig could be taken
but if soe some could call few sets in parallel so tt fould need to be
organized someway
foo(^{2,3,4,6}, ^{0,0,3,4});
foo(^{{2,0}{3,0}{4,3}{6,4}});
its also ok it semms you can pass it to whole block
{ } ^ t= {3,4,5}
as what it was started here
overally it gives both a loop syntax and new posibilities so its quite
interesting path
Technical Details
Message-ID:
<11cv41a$2582a$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-ams.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<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> <11cplsf$8nc4$1@dont-email.me> <11cpnbb$97kp$1@dont-email.me> <11cpo21$9fji$1@dont-email.me> <11cpov5$9q2h$1@dont-email.me> <11cq3hb$dnf9$1@dont-email.me> <11ctijh$1mb1u$1@dont-email.me> <11ctr0o$1or07$1@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news-ams.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!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: Tue, 10 Nov 2026 13:51:32 +0100
Organization: A noiseless patient Spider
Lines: 157
Message-ID: <11cv41a$2582a$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> <11cplsf$8nc4$1@dont-email.me>
<11cpnbb$97kp$1@dont-email.me> <11cpo21$9fji$1@dont-email.me>
<11cpov5$9q2h$1@dont-email.me> <11cq3hb$dnf9$1@dont-email.me>
<11ctijh$1mb1u$1@dont-email.me> <11ctr0o$1or07$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 10 Nov 2026 12:51:54 +0000 (UTC)
Injection-Info: dont-email.me;
logging-data="2269258"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18eYgKyASPaaIaYDlQgWyCfcVIArD8bT28="; posting-host="5e24ef116842e5f7dade8922bc1e4cca"
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:ZCUqA83J1k5JgWaWHUQfQ8cH4s4= sha256:K8sX/RL0wUMwU8M5lfkNz4ST06Lkwvl4csYB4mMFolM=
sha1:c+WPylQV/WXTppfadJAcjNgJJZc= sha256:OMScWMqdYF7/+D0HdTrVterQLHagmFWPwDo0gjaoicI=
In-Reply-To: <11ctr0o$1or07$1@dont-email.me>