Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #491 > unrolled thread
| Started by | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| First post | 2011-06-22 16:43 -0400 |
| Last post | 2011-06-27 17:13 +1000 |
| Articles | 20 on this page of 56 — 16 participants |
Back to article view | Back to comp.programming
fortran 77 errors "Bill Cunningham" <nospam@nspam.invalid> - 2011-06-22 16:43 -0400
Re: fortran 77 errors James Waldby <not@valid.invalid> - 2011-06-22 21:18 +0000
Re: fortran 77 errors "Bill Cunningham" <nospam@nspam.invalid> - 2011-06-22 18:31 -0400
Re: fortran 77 errors Patricia Shanahan <pats@acm.org> - 2011-06-22 17:21 -0700
Re: fortran 77 errors "Bill Cunningham" <nospam@nspam.invalid> - 2011-06-22 20:50 -0400
Re: fortran 77 errors Ian Collins <ian-news@hotmail.com> - 2011-06-23 14:58 +1200
Re: fortran 77 errors "Bill Cunningham" <nospam@nspam.invalid> - 2011-06-23 00:27 -0400
Re: fortran 77 errors blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> - 2011-06-23 17:07 +0000
Re: fortran 77 errors "Bill Cunningham" <nospam@nspam.invalid> - 2011-06-23 16:53 -0400
Re: fortran 77 errors Patricia Shanahan <pats@acm.org> - 2011-06-23 14:05 -0700
Re: fortran 77 errors "Bill Cunningham" <nospam@nspam.invalid> - 2011-06-24 17:58 -0400
Re: fortran 77 errors "robin" <robin51@dodo.mapson.com.au> - 2011-06-27 17:04 +1000
Re: fortran 77 errors Patricia Shanahan <pats@acm.org> - 2011-06-23 12:34 -0700
Re: fortran 77 errors blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> - 2011-06-23 17:06 +0000
Re: fortran 77 errors "robin" <robin51@dodo.mapson.com.au> - 2011-06-27 17:01 +1000
Re: fortran 77 errors Patricia Shanahan <pats@acm.org> - 2011-06-28 06:39 -0700
Re: fortran 77 errors free@securityaudit.val.newsbank.net (Dick Wesseling) - 2011-06-23 00:43 +0000
Re: fortran 77 errors "Ant" <not@home.today> - 2011-06-23 02:38 +0100
Re: fortran 77 errors "robin" <robin51@dodo.mapson.com.au> - 2011-06-27 17:07 +1000
Re: fortran 77 errors Geoff <geoff@invalid.invalid> - 2011-06-23 00:47 -0700
Re: fortran 77 errors Geoff <geoff@invalid.invalid> - 2011-06-23 00:55 -0700
Re: fortran 77 errors "Bill Cunningham" <nospam@nspam.invalid> - 2011-06-23 04:16 -0400
Re: fortran 77 errors Ike Naar <ike@sverige.freeshell.org> - 2011-06-23 09:23 +0000
Re: fortran 77 errors Patricia Shanahan <pats@acm.org> - 2011-06-23 06:55 -0700
Re: fortran 77 errors Patricia Shanahan <pats@acm.org> - 2011-06-23 07:02 -0700
Re: fortran 77 errors Rui Maciel <rui.maciel@gmail.com> - 2011-06-23 15:22 +0100
Re: fortran 77 errors Patricia Shanahan <pats@acm.org> - 2011-06-23 08:19 -0700
Re: fortran 77 errors Geoff <geoff@invalid.invalid> - 2011-06-23 08:52 -0700
Re: fortran 77 errors blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> - 2011-06-23 17:32 +0000
Re: fortran 77 errors Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-06-23 22:39 +0100
Re: fortran 77 errors blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> - 2011-06-24 20:08 +0000
Re: fortran 77 errors Rui Maciel <rui.maciel@gmail.com> - 2011-06-23 19:38 +0100
Re: fortran 77 errors "osmium" <r124c4u102@comcast.net> - 2011-06-23 10:25 -0500
Re: fortran 77 errors Patricia Shanahan <pats@acm.org> - 2011-06-23 09:47 -0700
Re: fortran 77 errors blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> - 2011-06-23 17:30 +0000
Re: fortran 77 errors "Bill Cunningham" <nospam@nspam.invalid> - 2011-06-23 17:30 -0400
Re: fortran 77 errors Dan <dantex1@aol.com> - 2011-06-25 10:10 -0700
Re: fortran 77 errors "Bill Cunningham" <nospam@nspam.invalid> - 2011-06-28 11:21 -0400
Re: fortran 77 errors Patricia Shanahan <pats@acm.org> - 2011-06-28 09:40 -0700
Re: fortran 77 errors "Bill Cunningham" <nospam@nspam.invalid> - 2011-06-28 17:59 -0400
Re: fortran 77 errors Patricia Shanahan <pats@acm.org> - 2011-06-28 15:21 -0700
Re: fortran 77 errors "robin" <robin51@dodo.mapson.com.au> - 2011-06-28 00:43 +1000
Re: fortran 77 errors Rui Maciel <rui.maciel@gmail.com> - 2011-06-28 11:40 +0100
Re: fortran 77 errors "robin" <robin51@dodo.com.au> - 2011-07-05 09:06 +1000
Re: fortran 77 errors "robin" <robin51@dodo.mapson.com.au> - 2011-06-28 00:41 +1000
Re: fortran 77 errors Rui Maciel <rui.maciel@gmail.com> - 2011-06-23 12:12 +0100
Re: fortran 77 errors Geoff <geoff@invalid.invalid> - 2011-06-23 06:52 -0700
Re: fortran 77 errors "Bill Cunningham" <nospam@nspam.invalid> - 2011-06-23 17:45 -0400
Re: fortran 77 errors Patricia Shanahan <pats@acm.org> - 2011-06-23 15:30 -0700
Re: fortran 77 errors Geoff <geoff@invalid.invalid> - 2011-06-23 17:25 -0700
Re: fortran 77 errors Patricia Shanahan <pats@acm.org> - 2011-06-24 10:35 -0700
Re: fortran 77 errors blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> - 2011-06-24 20:09 +0000
Re: fortran 77 errors Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-06-24 01:38 +0100
Re: fortran 77 errors "robin" <robin51@dodo.mapson.com.au> - 2011-06-27 17:10 +1000
Re: fortran 77 errors kym@kymhorsell.com - 2011-06-23 21:23 +0000
Re: fortran 77 errors "robin" <robin51@dodo.mapson.com.au> - 2011-06-27 17:13 +1000
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
| From | Geoff <geoff@invalid.invalid> |
|---|---|
| Date | 2011-06-23 00:55 -0700 |
| Message-ID | <06s507p2piouae5jkev2ctu7dktmudiqv9@4ax.com> |
| In reply to | #500 |
On Thu, 23 Jun 2011 00:47:17 -0700, Geoff <geoff@invalid.invalid> wrote: >c a simple hello world program c in Fortran c 10 program helloworld > 20 print *,'hello world' > 30 stop > 40 end I don't know how that got messed up in the post. c a simple hello world program c in fortran c 10 program helloworld 20 print *,'hello world' 30 stop 40 end
[toc] | [prev] | [next] | [standalone]
| From | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| Date | 2011-06-23 04:16 -0400 |
| Message-ID | <4e02f690$0$1966$bbae4d71@news.suddenlink.net> |
| In reply to | #501 |
Geoff wrote:
> On Thu, 23 Jun 2011 00:47:17 -0700, Geoff <geoff@invalid.invalid>
> wrote:
>
>> c a simple hello world program c in Fortran c 10 program
>> helloworld 20 print *,'hello world'
>> 30 stop
>> 40 end
>
> I don't know how that got messed up in the post.
>
> c a simple hello world program
> c in fortran
> c
> 10 program helloworld
> 20 print *,'hello world'
> 30 stop
> 40 end
I didn't know there were line numbers in fortran like in basic.
Bill
[toc] | [prev] | [next] | [standalone]
| From | Ike Naar <ike@sverige.freeshell.org> |
|---|---|
| Date | 2011-06-23 09:23 +0000 |
| Message-ID | <slrn3vfsj061h3.alc.ike@sverige.freeshell.org> |
| In reply to | #502 |
On 2011-06-23, Bill Cunningham <nospam@nspam.invalid> wrote: > I didn't know there were line numbers in fortran like in basic. The numbers in columns 2-5 are more like labels, they're not really linenumbers. There can be lines that don't have a label; and the numbers don't need to be increasing.
[toc] | [prev] | [next] | [standalone]
| From | Patricia Shanahan <pats@acm.org> |
|---|---|
| Date | 2011-06-23 06:55 -0700 |
| Message-ID | <naWdnSMFgJxf2J7TnZ2dnUVZ_sGdnZ2d@earthlink.com> |
| In reply to | #503 |
On 6/23/2011 2:23 AM, Ike Naar wrote: > On 2011-06-23, Bill Cunningham<nospam@nspam.invalid> wrote: >> I didn't know there were line numbers in fortran like in basic. > > The numbers in columns 2-5 are more like labels, they're not really linenumbers. > There can be lines that don't have a label; > and the numbers don't need to be increasing. Indeed. In all the Fortran programs I've read or written, very few lines have labels. I would not expect to see any labels at all in a simple "hello world" program. I think Geoff may have confused Fortran and Basic. Patricia
[toc] | [prev] | [next] | [standalone]
| From | Patricia Shanahan <pats@acm.org> |
|---|---|
| Date | 2011-06-23 07:02 -0700 |
| Message-ID | <PKqdnQGK9_cU2p7TnZ2dnUVZ_q2dnZ2d@earthlink.com> |
| In reply to | #506 |
On 6/23/2011 6:55 AM, Patricia Shanahan wrote: > On 6/23/2011 2:23 AM, Ike Naar wrote: >> On 2011-06-23, Bill Cunningham<nospam@nspam.invalid> wrote: >>> I didn't know there were line numbers in fortran like in basic. >> >> The numbers in columns 2-5 are more like labels, they're not really >> linenumbers. >> There can be lines that don't have a label; >> and the numbers don't need to be increasing. > > Indeed. In all the Fortran programs I've read or written, very few lines > have labels. I would not expect to see any labels at all in a simple > "hello world" program. I think Geoff may have confused Fortran and Basic. Or, seeing his later message, maybe the writers of the interactive Fortran Geoff used based it on an interactive Basic, and kept the Basic line numbering. Patricia
[toc] | [prev] | [next] | [standalone]
| From | Rui Maciel <rui.maciel@gmail.com> |
|---|---|
| Date | 2011-06-23 15:22 +0100 |
| Message-ID | <4e034cda$0$6432$a729d347@news.telepac.pt> |
| In reply to | #506 |
Patricia Shanahan wrote: > Indeed. In all the Fortran programs I've read or written, very few lines > have labels. I would not expect to see any labels at all in a simple > "hello world" program. I think Geoff may have confused Fortran and Basic. Not necessarily. To the best of my knowledge the code snippet that Geoff presented is Fortran77 and not Basic, although it was poorly pasted. The comment line starts with a 'c' character in the first column, which means it's a Fortran 77 comment, the line numbers start at the 2nd column, which is how labels are defined in Fortran77, and the instruction line starts at the 7th column, which is exactly where Fortran77 instructions start. Granted, the last time I've looked at fortran77 code was aroun 10 years ago, and things are a bit fuzzy right now. Yet, the code does conform to fortan77, in spite of the paste errors. Rui Maciel
[toc] | [prev] | [next] | [standalone]
| From | Patricia Shanahan <pats@acm.org> |
|---|---|
| Date | 2011-06-23 08:19 -0700 |
| Message-ID | <97adnZk4b6wCxJ7TnZ2dnUVZ_tidnZ2d@earthlink.com> |
| In reply to | #508 |
On 6/23/2011 7:22 AM, Rui Maciel wrote: > Patricia Shanahan wrote: > >> Indeed. In all the Fortran programs I've read or written, very few lines >> have labels. I would not expect to see any labels at all in a simple >> "hello world" program. I think Geoff may have confused Fortran and Basic. > > Not necessarily. To the best of my knowledge the code snippet that Geoff > presented is Fortran77 and not Basic, although it was poorly pasted. The > comment line starts with a 'c' character in the first column, which means > it's a Fortran 77 comment, the line numbers start at the 2nd column, which > is how labels are defined in Fortran77, and the instruction line starts at > the 7th column, which is exactly where Fortran77 instructions start. To be a bit more precise, I meant "I think Geoff may have confused the Fortran statement label rules with the Basic line numbering rules". I agree that otherwise the posted code looks more like an attempt at Fortran than Basic. Patricia
[toc] | [prev] | [next] | [standalone]
| From | Geoff <geoff@invalid.invalid> |
|---|---|
| Date | 2011-06-23 08:52 -0700 |
| Message-ID | <upn607pod3lim761db8b7e9p614j97htl1@4ax.com> |
| In reply to | #509 |
On Thu, 23 Jun 2011 08:19:49 -0700, Patricia Shanahan <pats@acm.org> wrote: >On 6/23/2011 7:22 AM, Rui Maciel wrote: >> Patricia Shanahan wrote: >> >>> Indeed. In all the Fortran programs I've read or written, very few lines >>> have labels. I would not expect to see any labels at all in a simple >>> "hello world" program. I think Geoff may have confused Fortran and Basic. >> >> Not necessarily. To the best of my knowledge the code snippet that Geoff >> presented is Fortran77 and not Basic, although it was poorly pasted. The >> comment line starts with a 'c' character in the first column, which means >> it's a Fortran 77 comment, the line numbers start at the 2nd column, which >> is how labels are defined in Fortran77, and the instruction line starts at >> the 7th column, which is exactly where Fortran77 instructions start. > >To be a bit more precise, I meant "I think Geoff may have confused the >Fortran statement label rules with the Basic line numbering rules". I >agree that otherwise the posted code looks more like an attempt at >Fortran than Basic. > The code was copied from Bill's original post and edited with emacs which enforced its own rules on formatting. I added the line numbers because I remembered we had them back in the dim days of college. The system was an Interdata model 4 and the Fortran was non-standard for the era. It predated Fortran 77 and was not strict about formatting output. I wasn't doing any BASIC programming until 1978 or so, on a TRS-80 for fun. FWIW, the code I posted compiles and runs on OS X with gfortran 4.2.1 build 5664.
[toc] | [prev] | [next] | [standalone]
| From | blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> |
|---|---|
| Date | 2011-06-23 17:32 +0000 |
| Message-ID | <96hbkqF7dvU2@mid.individual.net> |
| In reply to | #511 |
In article <upn607pod3lim761db8b7e9p614j97htl1@4ax.com>, Geoff <geoff@invalid.invalid> wrote: > On Thu, 23 Jun 2011 08:19:49 -0700, Patricia Shanahan <pats@acm.org> > wrote: > > >On 6/23/2011 7:22 AM, Rui Maciel wrote: > >> Patricia Shanahan wrote: [ snip ] > >To be a bit more precise, I meant "I think Geoff may have confused the > >Fortran statement label rules with the Basic line numbering rules". I > >agree that otherwise the posted code looks more like an attempt at > >Fortran than Basic. > > > > The code was copied from Bill's original post and edited with emacs > which enforced its own rules on formatting. I added the line numbers > because I remembered we had them back in the dim days of college. The > system was an Interdata model 4 and the Fortran was non-standard for > the era. It predated Fortran 77 and was not strict about formatting > output. I wasn't doing any BASIC programming until 1978 or so, on a > TRS-80 for fun. > > FWIW, the code I posted compiles and runs on OS X with gfortran 4.2.1 > build 5664. > For what it's worth, Fortran 77 supports both statement labels *and* line numbers -- the latter being positioned after column 72 and ignored by the compiler. Line numbers were useful back in the punched-card days; diligently numbering all the lines of one's program meant that if one dropped the card deck containing the source code, one could put the cards back in order using a card-sorting machine on the columns (73-80) containing the line numbers. Ah, the not-always-good old days! -- B. L. Massingill ObDisclaimer: I don't speak for my employers; they return the favor.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2011-06-23 22:39 +0100 |
| Message-ID | <0.35e0cd98d1ba5131b62a.20110623223910BST.8739j09qip.fsf@bsb.me.uk> |
| In reply to | #516 |
blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> writes: <snip> > For what it's worth, Fortran 77 supports both statement labels > *and* line numbers -- the latter being positioned after column 72 > and ignored by the compiler. Line numbers were useful back in > the punched-card days; diligently numbering all the lines of one's > program meant that if one dropped the card deck containing the source > code, one could put the cards back in order using a card-sorting > machine on the columns (73-80) containing the line numbers. These columns were not restricted to "line numbers". For one thing, it was common for them not to be sequential so that cards could be added without renumbering everything, and the field often contained something to identify the program. That way, if you dropped a box with more than one program in it, you could get it back into order in less than a day and a half. My speciality was to forget to flip the metal card catcher back after removing a deck from the output hopper. The next deck that went though would then spray up into the room like geek confetti. It was always an un-sequenced deck. > Ah, the not-always-good old days! -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> |
|---|---|
| Date | 2011-06-24 20:08 +0000 |
| Message-ID | <96k95cF6crU2@mid.individual.net> |
| In reply to | #527 |
In article <0.35e0cd98d1ba5131b62a.20110623223910BST.8739j09qip.fsf@bsb.me.uk>, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote: > blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> writes: > <snip> > > For what it's worth, Fortran 77 supports both statement labels > > *and* line numbers -- the latter being positioned after column 72 > > and ignored by the compiler. Line numbers were useful back in > > the punched-card days; diligently numbering all the lines of one's > > program meant that if one dropped the card deck containing the source > > code, one could put the cards back in order using a card-sorting > > machine on the columns (73-80) containing the line numbers. > > These columns were not restricted to "line numbers". For one thing, it > was common for them not to be sequential so that cards could be added > without renumbering everything, Quite -- that's what I meant, though admittedly not what I said! (Choosing a good increment between successive whatever-you-call-'ems was sometimes tricky, too.) > and the field often contained something > to identify the program. That way, if you dropped a box with more than > one program in it, you could get it back into order in less than a day > and a half. Oh right -- I had forgotten that indeed it was typical for the "line numbers" to also include alphabetic text identifying the program. A quick Google search seems to confirm my recollection that these things (text plus number) are called "sequence numbers". I'm remembering too that some keypunches had features that would to some extent automate producing sequence numbers. I could be wrong about that. > My speciality was to forget to flip the metal card catcher back after > removing a deck from the output hopper. The next deck that went though > would then spray up into the room like geek confetti. It was always an > un-sequenced deck. > > > Ah, the not-always-good old days! And you left my comment in for good reason. :-) By the time I started writing nontrivial programs (as opposed to short homeworks and such), I had access to electronic editors [*], so I don't have good war stories about cards. But I can imagine. I did have a summer job at which my tasks involved a bit of keypunching and the occasional use of a card sorter. Those were the days? [*] Starting with the line editor available under MVS/TSO. By today's standards it was unbelievably primitive, but compared to cards, *WHAT* an improvement .... "Thanks for the memories"? -- B. L. Massingill ObDisclaimer: I don't speak for my employers; they return the favor.
[toc] | [prev] | [next] | [standalone]
| From | Rui Maciel <rui.maciel@gmail.com> |
|---|---|
| Date | 2011-06-23 19:38 +0100 |
| Message-ID | <4e0388e7$0$6435$a729d347@news.telepac.pt> |
| In reply to | #509 |
Patricia Shanahan wrote: > To be a bit more precise, I meant "I think Geoff may have confused the > Fortran statement label rules with the Basic line numbering rules". I > agree that otherwise the posted code looks more like an attempt at > Fortran than Basic. I see what you mean and you are right. Rui Maciel
[toc] | [prev] | [next] | [standalone]
| From | "osmium" <r124c4u102@comcast.net> |
|---|---|
| Date | 2011-06-23 10:25 -0500 |
| Message-ID | <96h46lFdglU1@mid.individual.net> |
| In reply to | #508 |
Various people wrote various things about various variants of Fortran: This thread should demonstrate, Bill, that you are not going to have any experts to help you on Fortran. At least on this newsgroup. Many of us have used Fortran ( I have both used it and taught it in college - I remember the difficulty in finding a text book I really liked, even back then) but it was a long time ago and memories fade. Any minute advantages that Fortran might have over C are overwhelmed by the lack of *current* expertise. Either stick with C or else choose a modern language as an alternative. From what I have seen, I don't think a different language will help you at all.
[toc] | [prev] | [next] | [standalone]
| From | Patricia Shanahan <pats@acm.org> |
|---|---|
| Date | 2011-06-23 09:47 -0700 |
| Message-ID | <S5WdnfE9AMWp857TnZ2dnUVZ_o6dnZ2d@earthlink.com> |
| In reply to | #510 |
On 6/23/2011 8:25 AM, osmium wrote: > Various people wrote various things about various variants of Fortran: > > This thread should demonstrate, Bill, that you are not going to have any > experts to help you on Fortran. At least on this newsgroup. Many of us > have used Fortran ( I have both used it and taught it in college - I > remember the difficulty in finding a text book I really liked, even back > then) but it was a long time ago and memories fade. Any minute advantages > that Fortran might have over C are overwhelmed by the lack of *current* > expertise. I'm a rather rusty expert. In the 1980's I worked on a Fortran 77 compiler. I had a copy of the standard, and knew it at the level of being able to go straight to the page that covered an issue. In order to get a compiler working it is necessary to study the whole language, not just the frequently used features. However, when I stopped working on compilers Fortran 90 was about to come out. I know some of the ideas that were being worked on, but not the final resolution. I have not done significant Fortran programming since then. In any case, I'm dubious about whether the OP is likely to benefit from a change of language. It may be better to stick with whatever language he currently finds most comfortable, or least uncomfortable, and focus on practicing algorithm and program design in that language. Patricia
[toc] | [prev] | [next] | [standalone]
| From | blmblm@myrealbox.com <blmblm.myrealbox@gmail.com> |
|---|---|
| Date | 2011-06-23 17:30 +0000 |
| Message-ID | <96hbgsF7dvU1@mid.individual.net> |
| In reply to | #510 |
In article <96h46lFdglU1@mid.individual.net>, osmium <r124c4u102@comcast.net> wrote: > Various people wrote various things about various variants of Fortran: > > This thread should demonstrate, Bill, that you are not going to have any > experts to help you on Fortran. At least on this newsgroup. Indeed. I was just thinking I should suggest asking in a group where there *are* experts -- comp.lang.fortran. I hear that it gets a lot of junk posts, which some news providers filter out but Google Groups does not, but there is help to be had there, in my experience. [ snip ] > From what I have seen, I don't think a different language will help you at > all. I'm inclined to agree, alas. -- B. L. Massingill ObDisclaimer: I don't speak for my employers; they return the favor.
[toc] | [prev] | [next] | [standalone]
| From | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| Date | 2011-06-23 17:30 -0400 |
| Message-ID | <4e03b0b6$0$1975$bbae4d71@news.suddenlink.net> |
| In reply to | #510 |
"osmium" <r124c4u102@comcast.net> wrote in message
news:96h46lFdglU1@mid.individual.net...
> Various people wrote various things about various variants of Fortran:
>
> This thread should demonstrate, Bill, that you are not going to have any
> experts to help you on Fortran. At least on this newsgroup. Many of us
> have used Fortran ( I have both used it and taught it in college - I
> remember the difficulty in finding a text book I really liked, even back
> then) but it was a long time ago and memories fade. Any minute advantages
> that Fortran might have over C are overwhelmed by the lack of *current*
> expertise.
>
> Either stick with C or else choose a modern language as an alternative.
> From what I have seen, I don't think a different language will help you at
> all.
http://www.stanford.edu/class/me200c/tutorial_77/
I came across this page and fortran looked pretty simple. Objective C is
definately out and I didn't like the looks of python. C++ might be the only
alternative and it mixes well with C. Everyone seems to use C anyway.
Althougth sometimes it's kind of hard to read, kandr2 seems to be about
the best text on C I've read. As others have pointed out it's algorithms and
how to do things in languages that perplexes me. I haven't looked at Ada or
Haskell or Pascal but they're probably no better than C++ and probably OOP
languages too. Note I don't know because I haven't checked. kandr2 gets
frustratingly difficult for me pretty quick so maybe I need to do the
excercises at the end of the chapters.
Bill
[toc] | [prev] | [next] | [standalone]
| From | Dan <dantex1@aol.com> |
|---|---|
| Date | 2011-06-25 10:10 -0700 |
| Message-ID | <a8915b04-c8f6-453a-81ad-1379d07d6197@q12g2000prb.googlegroups.com> |
| In reply to | #510 |
On Jun 23, 7:25 am, "osmium" <r124c4u...@comcast.net> wrote: > Various people wrote various things about various variants of Fortran: > > This thread should demonstrate, Bill, that you are not going to have any > experts to help you on Fortran. At least on this newsgroup. Many of us > have used Fortran ( I have both used it and taught it in college - I > remember the difficulty in finding a text book I really liked, even back > then) but it was a long time ago and memories fade. Any minute advantages > that Fortran might have over C are overwhelmed by the lack of *current* > expertise. I suggest that you (Bill) go to "comp.lang.fortran" if you want to find expert fortran advice. You'll find plenty over there. By the way... there is no "Begin" in fortran and fortran doesn't have line numbers and doesn't require you to use labels either. However, I can see that you're just starting to dabble in fortran. You can find a HUGE number of online fortran tutorials to get you started. And they cover modern fortran. There are good books too, but... you generally have to order them online as most bookstores don't carry a lot. There are free fortran 95 compilers out there (note: the latest standard is fortran 2008, though, there are not yet any compilers for it.). Thus, there's not much need to use a decades old version unless you just want to. > Either stick with C or else choose a modern language as an alternative. I think you'll find that today's fortran is quite modern and "extremely" easy to learn. IMHO, I don't think it gets any easier. All you need for your first test program is 2 lines: (using free-source form rather than the very old/original fixed source form) print *, "hello world" end Here's a small sample program that shows some simple text and numeric array manipulations: character(64) :: a = 'hello world' integer :: i(10) = (/ (k, k=1,10) /) write(*,*) trim(a) write(*,*) 'Say ' // a(1:5) // ' to the ' // a(7:11) write(*,*) i write(*,*) i(10:1:-1) write(*,*) i(2:10:2) write(*,*) i(2:10:2) / 2 end ------ Results of execution -------- hello world Say hello to the world 1 2 3 4 5 6 7 8 9 10 10 9 8 7 6 5 4 3 2 1 2 4 6 8 10 1 2 3 4 5 However, I wouldn't recommend a change from your "language of choice" without a compelling reason (modern or not). It all depends on what you're trying to write and why you wish to change. Dan :-)
[toc] | [prev] | [next] | [standalone]
| From | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| Date | 2011-06-28 11:21 -0400 |
| Message-ID | <4e09f181$0$1952$bbae4d71@news.suddenlink.net> |
| In reply to | #510 |
osmium wrote:
> Various people wrote various things about various variants of Fortran:
>
> This thread should demonstrate, Bill, that you are not going to have
> any experts to help you on Fortran. At least on this newsgroup. Many of
> us have used Fortran ( I have both used it and taught it in
> college - I remember the difficulty in finding a text book I really
> liked, even back then) but it was a long time ago and memories fade. Any
> minute advantages that Fortran might have over C are overwhelmed
> by the lack of *current* expertise.
>
> Either stick with C or else choose a modern language as an
> alternative. From what I have seen, I don't think a different
> language will help you at all.
I don't think I'm going to dump C. But what I have noticed is a quick
understanding of the fortran syntax. Algorithms is what I don't know. In any
language I don't know how to go about doing what I want to do.
Bill
[toc] | [prev] | [next] | [standalone]
| From | Patricia Shanahan <pats@acm.org> |
|---|---|
| Date | 2011-06-28 09:40 -0700 |
| Message-ID | <9I6dnabsg_pgnpfTnZ2dnUVZ_tOdnZ2d@earthlink.com> |
| In reply to | #549 |
On 6/28/2011 8:21 AM, Bill Cunningham wrote: > osmium wrote: >> Various people wrote various things about various variants of Fortran: >> >> This thread should demonstrate, Bill, that you are not going to have >> any experts to help you on Fortran. At least on this newsgroup. Many of >> us have used Fortran ( I have both used it and taught it in >> college - I remember the difficulty in finding a text book I really >> liked, even back then) but it was a long time ago and memories fade. Any >> minute advantages that Fortran might have over C are overwhelmed >> by the lack of *current* expertise. >> >> Either stick with C or else choose a modern language as an >> alternative. From what I have seen, I don't think a different >> language will help you at all. > > I don't think I'm going to dump C. But what I have noticed is a quick > understanding of the fortran syntax. Algorithms is what I don't know. In any > language I don't know how to go about doing what I want to do. Most algorithms you will ever need have already been worked out. If you search for the name of a problem you will find examples of how to solve it in many languages. I've studied algorithm design, and can do it, but use that skill far less often than just looking up the algorithm I need. The problem you need solve is not designing algorithms, but designing programs to use the algorithms. Patricia
[toc] | [prev] | [next] | [standalone]
| From | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| Date | 2011-06-28 17:59 -0400 |
| Message-ID | <4e0a4ed6$0$1962$bbae4d71@news.suddenlink.net> |
| In reply to | #550 |
Patricia Shanahan wrote:
> Most algorithms you will ever need have already been worked out. If
> you search for the name of a problem you will find examples of how to
> solve it in many languages. I've studied algorithm design, and can do
> it, but use that skill far less often than just looking up the
> algorithm I need.
> The problem you need solve is not designing algorithms, but designing
> programs to use the algorithms.
Yes yes I gree. That's very hard for me to do in C. One thing I notice
on clc is that good C programmers are corrected by other seasoned C
programmers quite a bit. C seems to be something that you learn and just
keep on learning. But what little bit I read about fortran like .le. .lt.
and do 10 i=0...
10 continue all makes sense. And i haven't really gotten into it. It's like
BASIC to me.
Bill
[toc] | [prev] | [next] | [standalone]
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
Back to top | Article view | comp.programming
csiph-web