Path: utzoo!attcan!uunet!lll-winken!ames!ncar!tank!uxc!uxc.cso.uiuc.edu!uxg.cso.uiuc.edu!uxa.cso.uiuc.edu!gsg0384 From: gsg0384@uxa.cso.uiuc.edu Newsgroups: comp.lang.misc Subject: FORTRAN Lament (was:Dynamic array d Message-ID: <117400003@uxa.cso.uiuc.edu> Date: 8 Jan 89 08:39:00 GMT Lines: 39 Nf-ID: #N:uxa.cso.uiuc.edu:117400003:000:1552 Nf-From: uxa.cso.uiuc.edu!gsg0384 Jan 8 02:39:00 1989 Regarding to my original posting <117400002@uxa.cso.uiuc.edu> from gsg0384@uxa.cso.uiuc.edu : >1. What languages support the run-time array sizing in a particular module >as in FORTRAN 8x ? ... I appreciate many kind replies from net landers, Particular thanks to Roberts. I am sorry not to be specific in my original posting. Now I think I may understand the cost of dynamic *local* array sizing. But I think we, stone-age FORTRAN programmers, usually physicists, mecha- nical engineers, and civil engineers, need that feature desperately. Otherwise, we should always provide the source code to the customer so that he can redimension for the memory size of his hardware. By 'run-time array sizing', I meant the following practice in Turing. var n:int put "Give size." get n var a:array 1..n of real /* Now I can use the dynamic array a[i], i = 1, ..., n. */ By 'to dimension a local array dynamically', I meant the following practice in CRAY UNICOS' ftn77 vectorizing compiler's extension to FORTRAN 77. subroutine routine(n) integer n real a(n) c Now I can use *local* array a(i), i = 1, ..., n for CRAY II only. Too often I cannot help thinking that the CStists do research on what they like to do, but not on what most users want them to do. The result is that we still don't have a language any better than FORTRAN 77 for our purpose, as is stated in Press et al.'s 'Numerical Recipe in C'. G. Hugh SONG gsg0384@uxa.cso.uiuc.edu U. of Illinois at Urbana-Champaign