• some new syntax ideas

    From fir@21:1/5 to All on Sun Aug 25 21:01:29 2024
    as its known i form time to time think of
    inventing new more celaner (purer) syntax
    for c (over c) and extended c (used to codename
    it c2 now i think if codename it as "fi")

    some ideas (and obserwations)

    I.

    i noticed as structures in c are defined sorta such way

    car { engine {int x; int y;}, wheel{int t; int w} [4] }

    i mean structures contain substructures then it should
    and substructure you dont define like

    car { engine {x{int}, y{int}}, wheel{t{int}, w{int}} [4] }

    so natural way of defining "int a" is

    a {int}
    its like structure a definition containing "int" structure
    which is defined elsewhere

    II.

    i noticed bac then tehat initialisation and assigments
    are two different things and idea is to use space as
    definition "=" for initialisation (howewer those kind
    of ideas of my change, so

    a 10, b 10, c 20 //initialisations

    is

    int a = 10, b = 10, c = 20;

    you can omit "int" for type as integer may be
    assumed 10 and 20

    flaots would be

    x 10.0 , y 20.0 , z 30.0

    (as to shorts and doubles i dont know)

    III.

    loops, the simplest loop form that coem to my mind is now

    10' print("alala")

    where 10' means 10 times, could also be variable

    width 640
    height 480

    height' width' set_pixel()

    as to use this indexes witch which teh loops iterate
    (typical i, j) i dont know yet (could be something
    like width.i height.i but for sure something other,
    (its a question if this i needs separate name,
    also it is soem question if such width should work
    by value or by variable name

    by value i mean

    width 100

    width' {width++}
    would work 100 times amd width will end as 200

    by 'variable' if would probably work more like

    for(int i=0; i<width; i++) width++;

    it is to infinity (probably by value is better)

    eventually maybe also some like conitional loop
    could also be added like

    x<100 ' x=rand()%200;

    which would work until 'by variable'

    but many things need yet to be workd out

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)