Code Comments
Programming Forum and web based access to our favorite programming groups.Bamm wrote: > > > I'm sorry it didn't help. It was still asking for an Enter after any > key was pressed. :( Is there an equivalent pchar()? In some compilers I remember a function that did not wait for enter. -- Gary Scott mailto:garylscott@sbcglobal dot net Fortran Library: http://www.fortranlib.com Support the Original G95 Project: http://www.g95.org -OR- Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html If you want to do the impossible, don't hire an expert because he knows it can't be done. -- Henry Ford
Post Follow-up to this messageBamm wrote: (snip) > I'm sorry it didn't help. It was still asking for >an Enter after any key was pressed. :( You need something like getch(), which in unix is part of the ncurses library. Even with that, you need cbreak() to turn off line buffering. This is not part of the Fortran standard, but your system might have it. -- glen
Post Follow-up to this messageLuka Djigas wrote: > On Fri, 28 Mar 2008 18:33:50 -0700 (PDT), Bamm <bammster@gmail.com> > wrote: > > > Why not just "Press RETURN to continue" ? > > People do seem to have trouble with the "any key" anyway :-) My keyboard doesn't even *have* an "Any" key. cheers, paulv p.s. My keyboard also doesn't have a "Return" key. p.p.s. :o)
Post Follow-up to this message> > Why not just "Press RETURN to continue" ? > > > My keyboard doesn't even *have* an "Any" key. > > cheers, > > paulv > > p.s. My keyboard also doesn't have a "Return" key. > > p.p.s. :o) I'd just want to add: when I was new using computers, I never had trouble pressing any key - I thought is was pretty straightforward English, and I am not a native English speaker! However I did have trouble finding the RETURN key. I had an ENTER key, but it took me several ws to figure out that they were the same. At least telling a user to press "any" key had double meaning; one may interpret it the right or wrong way. However there is nothing in standard English to suggest that the words Return and Enter are somehow synonymous. One has to have good background in computer history for this to be naturally understood.
Post Follow-up to this messagePaul van Delst wrote: > Luka Djigas wrote: > > My keyboard doesn't even *have* an "Any" key. If you go to tacky enough gift shops, you can buy one. I have a nice black one with white letters glued to my desktop keyboard. ;) Dick Hendrickson p.s. And yes, it was hard to glue the white letters to the keyboard! > > cheers, > > paulv > > p.s. My keyboard also doesn't have a "Return" key. > > p.p.s. :o) >
Post Follow-up to this messageOn Mon, 31 Mar 2008 09:13:48 -0700 (PDT), Bamm <bammster@gmail.com> wrote: >I'd just want to add: when I was new using computers, I never had >trouble pressing any key - I thought is was pretty straightforward >English, and I am not a native English speaker! > >However I did have trouble finding the RETURN key. I had an ENTER key, >but it took me several ws to figure out that they were the same. I am not a native english speaker either, so maybe I misunderstood, but Return and Enter key are not the same. Although the difference today is less known that it was, apart from the return key being the left one on an average keyboard, and enter key being the right-down one, there is also the difference in their function. For which I leave you with wikipedia, or EDT editor which one used to use under msdos :-) > >At least telling a user to press "any" key had double meaning; one may >interpret it the right or wrong way. However there is nothing in >standard English to suggest that the words Return and Enter are >somehow synonymous. One has to have good background in computer >history for this to be naturally understood. pozdrav dig
Post Follow-up to this messageOn Mon, 31 Mar 2008 09:13:48 -0700 (PDT), Bamm wrote: > However I did have trouble finding the RETURN key. I had an ENTER key, > but it took me several ws to figure out that they were the same. My keyboard has both a RETURN key and an ENTER key. Although they can be used interchangeably most of the time, they send different keycodes and there are a few applications that actually distinguish between the two. Mathematica is one example. A RETURN simply means I want to continue typing on the next line, while an ENTER means to evaluate the expression in the current cell. -- Dave Seaman Court affirms Judge Yohn's ruling. <http://www.ipsnews.net/news.asp?idnews=41761>
Post Follow-up to this messageOn Mar 31, 9:13=A0am, Bamm <bamms...@gmail.com> wrote: > > <snip> > However I did have trouble finding the RETURN key. I had an ENTER key, > but it took me several ws to figure out that they were the same. I used to use a terminal that had a key called RETURN that was separate from ENTER. RETURN issued a CR character, ENTER issued a different code (don't remember which tho). Software treated them the same or different depending on context. > > At least telling a user to press "any" key had double meaning; one may > interpret it the right or wrong way. However there is nothing in > standard English to suggest that the words Return and Enter are > somehow synonymous. One has to have good background in computer > history for this to be naturally understood.
Post Follow-up to this messageThere's been so much discussion on my original post, but in the end, the answer is simply, it can't be done in Fortran. Thanks for all the suggestions though.
Post Follow-up to this messageBamm <bammster@gmail.com> wrote: > There's been so much discussion on my original post, but in the end, > the answer is simply, it can't be done in Fortran. Thanks for all the > suggestions though. Basically, that's right. There can sometimes be system-dependent ways that might be acessible from Fortran, but it can't be done directly "in Fortran". Which makes it even more puzzling why such a translation would be assigned as part of a homework. Translating something from Basic to Fortran (particularly an old version of Fortran) seems like an odd homework problem in the first place. It wouldn't fit well in a typival Fortran class (because of the assumption that you know Basic). It would fit even less well in a typical Basic class. It seems even more odd when it is something that can't properly be translated. I suppose it could possibly be intended as an illustration of language diferences, but it would be a rather "nasty" approach to assign an "impossible" homework problem and let you figure out that it is impossible. I've seen profs do things like that, but it isn't common. It leads one to suspect more mundane explanations. -- Richard Maine | Good judgement comes from experience; email: last name at domain . net | experience comes from bad judgement. domain: summertriangle | -- Mark Twain
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.