Giter Site home page Giter Site logo

cs-joy / algol Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 69 KB

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

Home Page: https://en.wikipedia.org/wiki/ALGOL

License: MIT License

procedural imperative structured static strong lexical

algol's Introduction

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

algol's People

Contributors

cs-joy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.