Re: Bliss

Liste des GroupesRevenir à co vms 
Sujet : Re: Bliss
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.os.vms
Date : 13. Jul 2024, 04:53:48
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v6stoc$3e8kc$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Pan/0.158 (Avdiivka; )
On Fri, 12 Jul 2024 23:23:22 -0400, Hunter Goatley wrote:

It's not much, but I successfully compiled a module. It complains about
MAIN=main, and I'm not sure why, but I successfully created a .c with a
main() that called my routine in the BLISS module (which called back to
the C module to actually print some output). Pretty slick!

I was able to compile this example adapted from page 1-15 of the May
1987 “Bliss Language Reference Manual”:

    MODULE E1 (MAIN = CTRL) =
    BEGIN

        FORWARD ROUTINE
            CTRL,
            STEP;

        GLOBAL ROUTINE CTRL =
            !+
            ! This routine inputs a value, operates on it, and
            ! then outputs the result.
            !-
        BEGIN
            EXTERNAL ROUTINE
                GETNUM, ! Input a number from terminal
                PUTNUM; ! Output a number to terminal
            LOCAL
                X, ! Storage for input value
                Y; ! Storage for output value
            GETNUM(X);
            Y = STEP(.X);
            PUTNUM(.Y)
        END;

        ROUTINE STEP(A) =
            !+
            ! This routine adds 1 to the given value.
            !-
            (.A+1);

    END ELUDOM

That “MAIN =” elicited no complaints, but neither did it seem to do
anything useful. I was able to link the compiled code against this
driver program:

    #include <stdio.h>

    void GETNUM
      (
        int * x
      )
      {
        *x = 99;
      } /*getnum*/

    void PUTNUM
      (
        int x
      )
      {
        fprintf(stdout, "putnum(%d)\n", x);
      } /*putnum*/

    void CTRL(void);

    int main(void)
      {
        CTRL();
        return
            0;
      } /*main*/

And it output the message “putnum(100)”, as expected.

Date Sujet#  Auteur
12 Jul 24 * Bliss48Arne Vajhøj
12 Jul 24 +- Re: Bliss1Simon Clubley
12 Jul 24 +* Re: Bliss45Arne Vajhøj
12 Jul 24 i`* Re: Bliss44Hunter Goatley
12 Jul 24 i +* Re: Bliss12Robert A. Brooks
13 Jul 24 i i+* Re: Bliss2Lawrence D'Oliveiro
13 Jul 24 i ii`- Re: Bliss1Robert A. Brooks
13 Jul 24 i i+* Re: Bliss History4John H. Reinhardt
14 Jul 24 i ii+* Re: Bliss History2Lawrence D'Oliveiro
14 Jul 24 i iii`- Re: Bliss History1Rich Alderson
15 Jul 24 i ii`- Re: Bliss History1Hunter Goatley
15 Jul 24 i i`* Re: Bliss5Simon Clubley
15 Jul 24 i i +* Re: Bliss2bill
15 Jul 24 i i i`- Re: Bliss1Single Stage to Orbit
15 Jul 24 i i +- Re: Bliss1Dave Froble
16 Jul 24 i i `- Re: Bliss1Paul Hardy
12 Jul 24 i +* Re: Bliss3Hunter Goatley
12 Jul 24 i i`* Re: Bliss2Hunter Goatley
12 Jul 24 i i `- Re: Bliss1Hunter Goatley
12 Jul 24 i `* Re: Bliss28Hunter Goatley
12 Jul 24 i  +- Re: Bliss1Hunter Goatley
13 Jul 24 i  `* Re: Bliss26Lawrence D'Oliveiro
13 Jul 24 i   +* Re: Bliss16Hunter Goatley
13 Jul 24 i   i`* Re: Bliss15Lawrence D'Oliveiro
13 Jul 24 i   i +* Re: Bliss6Lawrence D'Oliveiro
13 Jul 24 i   i i+* Re: Bliss4Hunter Goatley
18 Jul 24 i   i ii`* Re: Bliss3Lawrence D'Oliveiro
18 Jul 24 i   i ii +- Re: Bliss1Hunter Goatley
19 Jul 24 i   i ii `- Re: Bliss1Arne Vajhøj
24 Jul 24 i   i i`- Re: Bliss1Lawrence D'Oliveiro
13 Jul 24 i   i +- Re: Bliss1Hunter Goatley
20 Jul 24 i   i `* Re: Bliss7Lawrence D'Oliveiro
20 Jul 24 i   i  `* Re: Bliss6Arne Vajhøj
21 Jul 24 i   i   +- Re: Bliss1Lawrence D'Oliveiro
21 Jul 24 i   i   `* Re: Bliss4Hunter Goatley
21 Jul 24 i   i    `* Re: Bliss3Hunter Goatley
21 Jul 24 i   i     `* Re: Bliss2Arne Vajhøj
21 Jul 24 i   i      `- Re: Bliss1Hunter Goatley
26 Jul 24 i   `* Re: Bliss9Lawrence D'Oliveiro
26 Jul 24 i    +- Re: Bliss1Hunter Goatley
26 Jul 24 i    +* Re: Bliss6John Reagan
26 Jul 24 i    i+- Re: Bliss1Craig A. Berry
27 Jul 24 i    i`* Re: Bliss4Arne Vajhøj
27 Jul 24 i    i +* Re: Bliss2Lawrence D'Oliveiro
28 Jul 24 i    i i`- Re: Bliss1Arne Vajhøj
29 Jul 24 i    i `- Re: Bliss1John Reagan
27 Jul 24 i    `- Re: Bliss1Lawrence D'Oliveiro
12 Jul 24 `- Re: Bliss1bill

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal