Thereby, the declaration gives (for certain simple functions) the computing rule for assigning values to the function (cf. ![]() It’s not hard to see how the former syntax is a natural extension of the latter, in turn coming from mathematical usage.ĪLGOL 58, similarly to FORTRAN, defines both single-line ‘functions’:Ī function declaration declares a given expression to be a function of certain of its variables. 10), the single-line function definition, inherited from its prececessor: FIRSTF(X) = A*X + B ![]() 27): FUNCTION AVRG (ALIST, N)įORTRAN II also includes another function syntax (p. ![]() The earliest such languages I can find are FORTRAN II and ALGOL 58, both published in the same year 1958 though the original FORTRAN (1956) can arguably also be included.įor FORTRAN, the first page of the manual chapter covering functions contains this example (p.
0 Comments
Leave a Reply. |