Deutsch   English   Français   Italiano  
<vrbo88$1j3e0$1@paganini.bofh.team>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: antispam@fricas.org (Waldek Hebisch)
Newsgroups: comp.lang.c
Subject: Re: Bart's Language
Date: Tue, 18 Mar 2025 12:17:14 -0000 (UTC)
Organization: To protect and to server
Message-ID: <vrbo88$1j3e0$1@paganini.bofh.team>
References: <vracit$178ka$1@dont-email.me>
Injection-Date: Tue, 18 Mar 2025 12:17:14 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="1674688"; posting-host="WwiNTD3IIceGeoS5hCc4+A.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64))
X-Notice: Filtered by postfilter v. 0.9.3
Bytes: 1772
Lines: 47

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