From: Salmon Egg on 27 Jan 2010 19:38 In article <vilain-09BA92.15041627012010(a)news.individual.net>, Michael Vilain <vilain(a)NOspamcop.net> wrote: > > A good FORTRAN programmer can write a FORTRAN program in *any* language. > > ;-) > > So true. I found that out when I wrote a program in C and found that > the variables in subroutines didn't retain their values when you exited > back to the main program. "Automatic what?" I said as my friend the C > wizard explained what was going on. IIRC, which I may not, FORTRAN calls were always by reference. In particular, Pascal calls could be either value or by reference. FORTRAN calls could be made by value because the value, even a constant, was located at some address. I do not know if things have changed, but this peculiarity of FORTRAN prevented truly recursive routines. I remember reading some Wirth routines that used recursive routines to greatly reduce the size and complexity of source code. Bill -- An old man would be better off never having been born.
From: Jolly Roger on 27 Jan 2010 20:20 In article <vilain-6981B5.09310427012010(a)news.individual.net>, Michael Vilain <vilain(a)NOspamcop.net> wrote: > In article <jollyroger-AF116F.08332427012010(a)news.individual.net>, > Jolly Roger <jollyroger(a)pobox.com> wrote: > > > In article <me-8DE562.07265227012010(a)news.supernews.com>, > > Dan <me(a)here.net> wrote: > > > > > In article <SalmonEgg-5F14B1.02321527012010(a)news60.forteinc.com>, > > > Salmon Egg <SalmonEgg(a)sbcglobal.net> wrote: > > > > > > > Now it seems much more complicated. I wanted to use Lightweight IDE, > > > > but > > > > found out that you also needed FPC and Xcode. all with poor > > > > instructions. That is why I am considering BASIC again even with its > > > > built-in lures to produce spaghetti code. > > > > > > Only 30 year old BASIC interpreters have "built-in lures to produce > > > spaghetti code". Modern implementations have just as much structure as > > > Pascal. > > > > > > RealBASIC is the best BASIC compiler on OS X these days. A single > > > source file produces code for Windows, OS X and Linux. I use it and > > > find it powerful and easy to use. > > > > Just curious: What do you think of FutureBASIC? > > Gave up on them after paying for a Cocoa-version "real soon now" for > over 5 years. At $199/year, that's almost $1000 for nothing. Waisted > my money. Huh... FutureBASIC has been free for a long time now. -- Send responses to the relevant news group rather than email to me. E-mail sent to this address may be devoured by my very hungry SPAM filter. Due to Google's refusal to prevent spammers from posting messages through their servers, I often ignore posts from Google Groups. Use a real news client if you want me to see your posts. JR
From: Steve Hix on 27 Jan 2010 20:49 In article <tom_stiller-214575.15275327012010(a)news.individual.net>, Tom Stiller <tom_stiller(a)yahoo.com> wrote: > In article <vilain-9778F8.11202727012010(a)news.individual.net>, > Michael Vilain <vilain(a)NOspamcop.net> wrote: > > > In article <270120101333290569%nospam(a)nospam.invalid>, > > nospam <nospam(a)nospam.invalid> wrote: > > > > > In article <vilain-BB44A0.09502727012010(a)news.individual.net>, Michael > > > Vilain <vilain(a)NOspamcop.net> wrote: > > > > > > > HATE Pascal. It's upside down (with subroutines first). > > > > > > declaring something before using it is hardly upside down. you need to > > > do that with variables, for example. > > > > FORTRAN could do it. You can put all the declarations in front if you > > want. Most didn't bother, trusting the compiler's defaults. I declared > > everything as it helped with optimization (DEC's Fortran had some of the > > best optimization code out there). I sometimes wished for a > > "uninitialized variable warning". Guess that's why C header files > > seemed like such a good idea to me. Actually, I just think it's many > > vendor's implementation as a single pass compiler. Fortran et al did > > multiple passes. C does it with a preprocessor. > > > > Again, I think we're veering into a religious aspect of this discussion > > and there's no cheese down that tunnel. > > A good FORTRAN programmer can write a FORTRAN program in *any* language. > ;-) So can a bad one. Although I had trouble writing any that way in Forth.
From: Richard Maine on 27 Jan 2010 22:00 Salmon Egg <SalmonEgg(a)sbcglobal.net> wrote: > IIRC, which I may not, FORTRAN calls were always by reference. That is a common misimpression. It has never been true. The Fortran standard specifically avoids specification of that, considering it an implementation detail. It does vary from compiler to compiler, and from situation to situation even with a particular compiler. In fact, very few implementations did a strict call-by-reference. Some did something that was commonly called that, but if you wrote code that really assumed call-by-reference, it would often fail, particularly when optimizers were turned on. (Hint: with a strict call-by-reference, changing the value of one dummy argument would cause a corresponding change in the value of another dummy argument associated with the sam eactual argument. Optimizers tend to break such assumptions, doing what amounts to a temporary copy, sometimes even into a register.) It is even less true today (and for the past 2 decades) that Fortran uses call-by-reference. Variants of copy-in/copy-out are reasonably common in some situations. Call-by-value can be specified as of f2003, mostly as part of the a C interop facility, but it has other uses. > I do not know if things have changed, but this peculiarity of FORTRAN > prevented truly recursive routines. No. What prevented recursion is that it was not part of Fortran until Fortran 90. I don't know the distinction between recursion and whatever you refer to as "true recursion", but no form of recursion, "true" or not, was allowed at all prior to f90, other than in some vendor extensions. Recursion has been in Fortran for the last 2 decades, though. -- Richard Maine | Good judgment comes from experience; email: last name at domain . net | experience comes from bad judgment. domain: summertriangle | -- Mark Twain
From: Lao Ming on 28 Jan 2010 00:09
On Jan 27, 2:32 am, Salmon Egg <Salmon...(a)sbcglobal.net> wrote: > About 20 years ago, I liked to program in Pascal because it imposed a > degree of discipline that I would otherwise not had. Since retirement, > my needs for programming have been satisfied by using Excel. Lately > however, I find the need for something a bit more heavy duty to > manipulate strings. My thoughts ran to Pascal, but BASIC would be OK as > well. > > My problem is that I want a vanilla version without all the versatility > and features that seem to pervade software. Borland Pascal was good. You > could type and run. UCSD Pascal on the Apple ][ was good. You typed your > file and then could run. > > Now it seems much more complicated. I wanted to use Lightweight IDE, but > found out that you also needed FPC and Xcode. all with poor > instructions. That is why I am considering BASIC again even with its > built-in lures to produce spaghetti code. > > What would people here recommend that allow simple data manipulations > but not require much integration of software from multiple sources? > > Bill The Bash or Perl but bash is far more fun in my opinion. You can do almost anything with bash. |