Re: Bart's Language

Liste des GroupesRevenir à cl c 
Sujet : Re: Bart's Language
De : antispam (at) *nospam* fricas.org (Waldek Hebisch)
Groupes : comp.lang.c
Date : 18. Mar 2025, 13:17:14
Autres entêtes
Organisation : To protect and to server
Message-ID : <vrbo88$1j3e0$1@paganini.bofh.team>
References : 1
User-Agent : tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64))
bart <bc@freeuk.com> wrote:
 
This is the document I produced:
 
https://github.com/sal55/langs/blob/master/MFeatures.md
 
A couple of more substantial demo programs are here:
https://github.com/sal55/langs/tree/master/MExamples
 
(The bignum.m file was ported - by hand - to the bignum.c version that I
posted recently.)

Looking at features, can you say if the program below works?
And if it works, what is retrun value of foo?  "Equvalent" can
be written in C, but in C you have to keep sane order.

proc baz =
    println "Line 4"
end

func c3(int x) int =
    println "Line 1"
    x
end

func foo() int =
    const a = b + c3(c)
    bar
    const b = c + c2(2)
    baz
    const c = c1(10)
end

func c2(int x) int =
    println "Line 3"
    x
end

proc bar =
    println "Line 2"
end

func c1(int x) int =
    println "Line 5"
    x
 
--
                              Waldek Hebisch

Date Sujet#  Auteur
6 May 26 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal