Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
ALGOL
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====ALGOL 60==== (The way the bold text has to be written depends on the implementation, e.g. 'INTEGER'—quotation marks included—for integer. This is known as [[stropping (programming)|stropping]].) '''procedure''' Absmax(a) Size:(n, m) Result:(y) Subscripts:(i, k); '''value''' n, m; '''array''' a; '''integer''' n, m, i, k; '''real''' y; '''comment''' The absolute greatest element of the matrix a, of size n by m, is copied to y, and the subscripts of this element to i and k; '''begin''' '''integer''' p, q; y := 0; i := k := 1; '''for''' p := 1 '''step''' 1 '''until''' n '''do''' '''for''' q := 1 '''step''' 1 '''until''' m '''do''' '''if''' abs(a[p, q]) > y '''then''' '''begin''' y := abs(a[p, q]); i := p; k := q '''end''' '''end''' Absmax Here is an example of how to produce a [[Table (information)|table]] using Elliott 803 ALGOL.<ref>[http://www.billp.org/ccs/A104/ "803 ALGOL"] {{webarchive|url=https://web.archive.org/web/20100529063048/http://www.billp.org/ccs/A104/ |date=29 May 2010}}, the manual for Elliott 803 ALGOL</ref> FLOATING POINT ALGOL TEST' BEGIN REAL A,B,C,D' READ D' FOR A:= 0.0 STEP D UNTIL 6.3 DO BEGIN PRINT {{abbr|PUNCH(3)|sends output to the teleprinter rather than the tape punch.}},££L??' B := SIN(A)' C := COS(A)' PRINT PUNCH(3),{{abbr|SAMELINE|suppresses the carriage return + line feed normally printed between arguments.}},{{abbr|ALIGNED(1,6)|controls the format of the output with one digit before and six after the decimal point.}},A,B,C' END END'
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)