1 / 24

ALGOL 60

ALGOL 60. ALGOL 68. INT i, j, k, m, n; REAL a, b, x, y; BOOL p, q, overflow; CHAR c; FORMAT f; BYTES r; STRING s; BITS t; COMPL w, z; REF REAL xx, yy; UNION(INT, REAL) uir; PROC VOID task1, task2; [ 1: n] REAL x1, y1; FLEX [1:n] REAL a1; [1: m, 1: n] REAL x2;

colm
Download Presentation

ALGOL 60

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ALGOL 60

  2. ALGOL 68 INT i, j, k, m, n; REAL a, b, x, y; BOOL p, q, overflow; CHAR c; FORMAT f; BYTES r; STRING s; BITS t; COMPL w, z; REF REAL xx, yy; UNION(INT, REAL) uir; PROC VOID task1, task2; [ 1: n] REAL x1, y1; FLEX [1:n] REAL a1; [1: m, 1: n] REAL x2; [1: n, 1: n] REAL y2; [1: n] INT i1; [1: m, 1: n ] INT i2; [1: n] COMPL z1; PROC x or y = REF REAL: IF random < .5 THEN x ELSE y FI; PROC ncos = (INT i)REAL: cos(2 * pi * i / n); PROC nsin = (INT i)REAL: sin(2 * pi * i / n); PROC finish = VOID: GO TO stop; MODE BOOK = STRUCT(STRING text, REF BOOK next); BOOK draft; princeton: grenoble: st pierre de chartreuse: kootwijk: warsaw: zandvoort: amsterdam: tirrenia: north berwick: munich: finish

  3. Fortran

  4. Cobol

  5. LISP

  6. SNOBOL &TRIM = 1 WORDPAT = BREAK(&LCASE &UCASE) SPAN(&LCASE &UCASE "'-") . WORD COUNT = ARRAY('3:9',0) READ LINE = INPUT :F(DONE) NEXTW LINE WORDPAT = :F(READ) COUNT<SIZE(WORD)> = COUNT<SIZE(WORD)>+ 1 :(NEXTW) DONE OUTPUT = "WORD LENGTH NUMBER OF OCCURRENCES" I = 2 PRINT I = I + 1 OUTPUT = LPAD(I,5) LPAD(COUNT<I>,20) :S(PRINT) END

  7. SIMULA BEGIN INTEGER X, N, SUM, MAX; IF LASTITEM THEN OUTTEXT ("NULL LIST") ELSE BEGIN SUM:=MAX:=ININT; N:=1; WHILE LASTITEM DC BEGIN X:=ININT; N:=N+1; IF X > MAX THEN MAX:=X; SUM:=SUM+X; END; OUTTEXT("LIST LENGTH = "); OUTINT (N, 6); OUTTEXT(", HIGHEST = "); OUTINT (MAX, 6); OUTTEXT(", AVERAGE = "); OUTFIX (SUM/N, 2,, 8); END; OUTIMAGE; END

  8. Lenguaje C

  9. Basic

  10. APL (A Programming Language)

  11. Pascal

  12. SHELL: PROCEDURE OPTIONS (MAIN); DECLARE ARRAY(50) FIXED BIN(15), (K,N) FIXED BIN(15); GET LIST(N); GET EDIT((ARRAY(K) DO K = 1 TO N)); PUT EDIT((ARRAY(K) DO K = 1 TO N)); CALL BUBBLE(ARRAY,N); END BUBBLE; BUBBLE: PROCEDURE(ARRAY,N); /* BUBBLE SORT*/ DECLARE (I,J) FIXED BIN(15); DECLARE S BIT(1); /* SWITCH */ DECLARE Y FIXED BIN(15); /* TEMPO */ DO I = N-1 BY -1 TO 1; S = '1'B; DO J = 1 TO I; IF X(J)>X(J+1) THEN DO; S = '0'B; Y = X(J); X(J) = X(J+1); X(J+1) = Y; END; END; IF S THEN RETURN; END; RETURN; END SRT; PL/1

  13. Smalltalk

  14. ADA: Estructura de un programa ADA: Ejemplo simple

  15. ADA: Funciones

  16. PERL(Practical Extraction and Report Language)

  17. C++

  18. PROLOG

  19. ML fun trap( a, b, n, F ) = if n <= 0 orelse b-a <= 0.0 then 0.0 else let val delta = (b-a)/real(n) in delta*(F(a)+F(a+delta))/2.0 + trap(a+delta,b,n-1,F) end;

  20. HTML (HiperText Markup Language)

  21. Java

  22. XML(Extended MarkupLanguage)

  23. REFERENCIAS: PETER wegner, Programing with ADA: an introduction by means of graduates examples, Prentice hall 1980, Englewood Cliffs N.Y. Vowels Robin A., Algol 60 and Fortran IV, JW & SA 1974.http://www.herts.docs/tutorialsbasic:http://www.jegsworks.com/Lessons-sp/lesson9/lesson9-2.htmC++http://www.jegsworks.com/Lessons-sp/lesson9/lesson9-2.htmCOBOLhttp://www.jegsworks.com/Lessons-sp/lesson9/lesson9-2.htmFORTRANhttp://www.geocities.com/SiliconValley/Horizon/7536/ejemplos.htm JAVA http://www.jegsworks.com/Lessons-sp/lesson9/lesson9-2.htm PASCAL http://members.tripod.com.ar/pascal/estructura_de_un_programa_en_pas.htm

  24. REFERENCIAS: PROLOG http://www.uam.edu.ni/uam99/ingieneria/prolog/ Smalltalk http://www.dc.uba.ar/people/materias/plp/Smalltalk.html APL (A Programming Language) http://www.engin.umd.umich.edu/CIS/course.des/cis400/index.html XML (EXTENDED MARKUP LANGUAGE) http://www.programacion.net/html/xml/htmdsssl/capitulo3/capitulo3.htm PERL (Practical Extraction and Report Languaje) http://132.248.71.81/lacertus/tutorial_perl.html LENGUAJE C http://habitantes.elsitio.com/cafcocar/Lista_programas.html SNOBOL http://www.engin.umd.umich.edu/CIS/course.des/cis400/snobol/word.html ML http://cs.wwc.edu/Environment/SML-Tutorial.html PL/1 http://www.engin.umd.umich.edu/CIS/course.des/cis400/pl1/pl1bubble.html

More Related