Skip to content

Instantly share code, notes, and snippets.

@anandology
Created February 1, 2023 06:56
Show Gist options
  • Select an option

  • Save anandology/c8ff9836e541da642c1645a3d20abb1f to your computer and use it in GitHub Desktop.

Select an option

Save anandology/c8ff9836e541da642c1645a3d20abb1f to your computer and use it in GitHub Desktop.

Revisions

  1. anandology revised this gist Feb 1, 2023. No changes.
  2. anandology created this gist Feb 1, 2023.
    13 changes: 13 additions & 0 deletions main.aum
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    import Square (square);

    module body Main is

    function main(): ExitCode is
    let n: Int32 := 5;
    let n2:Int32 := square(n);

    printLn(n2);
    return ExitSuccess();
    end;

    end module body.
    5 changes: 5 additions & 0 deletions square.aui
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    module Square is

    function square(n: Int32): Int32;

    end module.
    7 changes: 7 additions & 0 deletions square.aum
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    module body Square is

    function square(n: Int32): Int32 is
    return n*n;
    end;

    end module body.