Skip to content
/ ALGOL Public

ALGOL-'"Algorithmic Language" is a family of imperative computer programming languages.

License

Notifications You must be signed in to change notification settings

cs-joy/ALGOL

Repository files navigation

ALGOL20

ALGOL

ALGOL-'"Algorithmic Language" is a family of imperative computer programming languages originally developed in 1958

Family tree of the Algol, Fortran and COBOL programming language dynasty

Test

Sample Programs

``` // the main program (this is a comment)

  BEGIN
  FILE F (KIND=REMOTE);
  EBCDIC ARRAY E [0:11];
  REPLACE E BY "HELLO WORLD!";
  WHILE TRUE DO
    BEGIN
        WRITE (F, *, E);
    END;
  END.
```

This program demonstrates the text output function of the ALGOL programming language by displaying the message "Hello world!". This code runs on a Unisys (Burroughs) A-series mainframe.

Compute the mean > Description This program computes the mean (average) of the absolute value of an array. Block structures, a dynamic array, and iterative statements are featured in this program. The bold type print represent keywords. > Source Code
```
// the main program (this is a comment)

begin
  integer N;
  Read Int(N);

  begin
    real array Data[1:N];
    real sum, avg;
    integer i;
    sum:=0;

    for i:=1 step 1 until N do
      begin real val;
        Read Real(val);
        Data[i]:=if val<0 then -val else val
      end;

    for i:=1 step 1 until N do
      sum:=sum + Data[i];
    avg:=sum/N;
    Print Real(avg)
  end
end	
```

Program Notes This program has NOT been tested due to the inability to locate the necessary compiler. It is posted here just to give you an example of what ALGOL source code looks like. Compare it to the other example listed to see the syntactic differences that exist in the language.

require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html

About

ALGOL-'"Algorithmic Language" is a family of imperative computer programming languages.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published