From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fc050a66c3b5d87d X-Google-Attributes: gid103376,public X-Google-Thread: 1094ba,86e8c626be2471ae X-Google-Attributes: gid1094ba,public From: eedelman@rock.helsinki.no-sp�mm.fi (Erik Edelmann) Subject: Re: F9X twister & ADA (was: n-dim'l vectors) Date: 2000/04/07 Message-ID: #1/1 X-Deja-AN: 607876748 References: <8cctts$ujr$1@nnrp1.deja.com> <38EA0440.1ECBC158@ncep.noaa.gov> <38ED4ECA.ADB698C9@sdynamix.com> X-Complaints-To: usenet@news.helsinki.fi X-Trace: oravannahka.helsinki.fi 955088201 27421 128.214.3.199 (7 Apr 2000 06:16:41 GMT) Organization: University of Helsinki NNTP-Posting-Date: 7 Apr 2000 06:16:41 GMT Newsgroups: comp.lang.fortran,comp.lang.ada Date: 2000-04-07T06:16:41+00:00 List-Id: On Thu, 06 Apr 2000 19:58:18 -0700, bv wrote: >What a slaughter of Fortran, showing every symptom of design by ignorant >and incompetent committee. What happened, where they too busy with >themselves to bother and learn from ADA?? If they did, they'd see >something along these lines: > > function normalize(v: in vector) return vector is > vni: float; > begin > vni := 1./norm(v) > return (v(x)*vni, v(y)*vni, v(z)*vni); > end normalize; > >-- somewhere in your code > u,v: vector; > . > . > . > u := normalize(v); Perhaps I'm just as stoopid as the Fortran comittee, but I really don't see what is so great about that code. What if you want to normalize a vector with 10 elements instead of 3, for example? Erik