Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #90116 > unrolled thread
| Started by | Real Troll <real.troll@trolls.com> |
|---|---|
| First post | 2016-07-08 00:00 -0300 |
| Last post | 2016-08-01 10:09 -0400 |
| Articles | 14 on this page of 74 — 29 participants |
Back to article view | Back to comp.lang.c
EXIT_SUCCESS Real Troll <real.troll@trolls.com> - 2016-07-08 00:00 -0300
Re: EXIT_SUCCESS luser droog <luser.droog@gmail.com> - 2016-07-07 19:54 -0700
Re: EXIT_SUCCESS Ian Collins <ian-news@hotmail.com> - 2016-07-08 15:03 +1200
Re: EXIT_SUCCESS James Kuyper <jameskuyper@verizon.net> - 2016-07-07 23:20 -0400
Re: EXIT_SUCCESS Richard Heathfield <rjh@cpax.org.uk> - 2016-07-08 10:19 +0100
Re: EXIT_SUCCESS Malcolm McLean <malcolm.mclean5@btinternet.com> - 2016-07-08 03:25 -0700
Re: EXIT_SUCCESS Richard Heathfield <rjh@cpax.org.uk> - 2016-07-08 13:49 +0100
Re: EXIT_SUCCESS Keith Thompson <kst-u@mib.org> - 2016-07-08 08:33 -0700
Re: EXIT_SUCCESS Gareth Owen <gwowen@gmail.com> - 2016-07-08 18:03 +0100
Re: EXIT_SUCCESS Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-08 19:11 +0100
Re: EXIT_SUCCESS "Osmium" <r124c4u102@comcast.net> - 2016-07-08 14:25 -0500
Re: EXIT_SUCCESS Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-08 20:34 +0100
Re: EXIT_SUCCESS Ken Brody <kenbrody@spamcop.net> - 2016-07-11 19:10 -0400
Re: EXIT_SUCCESS Robert Wessel <robertwessel2@yahoo.com> - 2016-07-10 01:21 -0500
Re: EXIT_SUCCESS Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2016-07-10 16:09 -0600
Re: EXIT_SUCCESS Keith Thompson <kst-u@mib.org> - 2016-07-10 16:01 -0700
Re: EXIT_SUCCESS "Osmium" <r124c4u102@comcast.net> - 2016-07-10 18:30 -0500
Re: EXIT_SUCCESS Keith Thompson <kst-u@mib.org> - 2016-07-10 17:00 -0700
Re: EXIT_SUCCESS James Kuyper <jameskuyper@verizon.net> - 2016-07-10 22:43 -0400
Re: EXIT_SUCCESS Siri Cruise <chine.bleu@yahoo.com> - 2016-07-10 22:31 -0700
Re: EXIT_SUCCESS raltbos@xs4all.nl (Richard Bos) - 2016-07-11 08:24 +0000
Re: EXIT_SUCCESS Ken Brody <kenbrody@spamcop.net> - 2016-07-11 19:18 -0400
Re: EXIT_SUCCESS gazelle@shell.xmission.com (Kenny McCormack) - 2016-07-11 00:47 +0000
Re: EXIT_SUCCESS gordonb.0aikd@burditt.org (Gordon Burditt) - 2016-07-12 18:52 -0500
Re: EXIT_SUCCESS "James R. Kuyper" <jameskuyper@verizon.net> - 2016-07-12 20:32 -0400
Re: EXIT_SUCCESS Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2016-07-12 20:59 -0600
Re: EXIT_SUCCESS gordonb.a2m2l@burditt.org (Gordon Burditt) - 2016-07-13 02:11 -0500
Re: EXIT_SUCCESS James Kuyper <jameskuyper@verizon.net> - 2016-07-13 11:26 -0400
Re: EXIT_SUCCESS Keith Thompson <kst-u@mib.org> - 2016-07-13 08:48 -0700
Re: EXIT_SUCCESS Tim Rentsch <txr@alumni.caltech.edu> - 2016-07-18 09:54 -0700
Re: EXIT_SUCCESS James Kuyper <jameskuyper@verizon.net> - 2016-07-08 17:46 -0400
Re: EXIT_SUCCESS Keith Thompson <kst-u@mib.org> - 2016-07-09 13:13 -0700
Re: EXIT_SUCCESS jgh@mdfs.net - 2016-07-25 04:42 -0700
Re: EXIT_SUCCESS Richard Heathfield <rjh@cpax.org.uk> - 2016-07-25 13:07 +0100
Re: EXIT_SUCCESS Udyant Wig <udyant.wig@gmail.com> - 2016-07-25 20:05 +0530
Re: EXIT_SUCCESS raltbos@xs4all.nl (Richard Bos) - 2016-07-25 16:06 +0000
Re: EXIT_SUCCESS Richard Heathfield <rjh@cpax.org.uk> - 2016-07-25 17:41 +0100
Re: EXIT_SUCCESS Keith Thompson <kst-u@mib.org> - 2016-07-25 11:04 -0700
Re: EXIT_SUCCESS Richard Heathfield <rjh@cpax.org.uk> - 2016-07-25 19:14 +0100
Re: EXIT_SUCCESS BartC <bc@freeuk.com> - 2016-07-25 22:00 +0100
Re: EXIT_SUCCESS Richard Heathfield <rjh@cpax.org.uk> - 2016-07-25 22:03 +0100
Re: EXIT_SUCCESS BartC <bc@freeuk.com> - 2016-07-25 22:41 +0100
Re: EXIT_SUCCESS jadill33@gmail.com - 2016-07-25 14:50 -0700
Re: EXIT_SUCCESS Keith Thompson <kst-u@mib.org> - 2016-07-25 15:04 -0700
Re: EXIT_SUCCESS David Brown <david.brown@hesbynett.no> - 2016-07-26 10:43 +0200
Re: EXIT_SUCCESS jadill33@gmail.com - 2016-07-25 14:41 -0700
Re: EXIT_SUCCESS David Brown <david.brown@hesbynett.no> - 2016-07-26 10:59 +0200
Re: EXIT_SUCCESS jadill33@gmail.com - 2016-07-27 06:20 -0700
Re: EXIT_SUCCESS Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-27 15:44 +0100
Re: EXIT_SUCCESS Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-27 16:22 +0100
Re: EXIT_SUCCESS Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2016-07-27 11:20 -0600
Re: EXIT_SUCCESS luser droog <luser.droog@gmail.com> - 2016-07-27 15:32 -0700
Re: EXIT_SUCCESS Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-07-28 14:47 +0100
Re: EXIT_SUCCESS Keith Thompson <kst-u@mib.org> - 2016-07-25 08:46 -0700
Re: EXIT_SUCCESS David Brown <david.brown@hesbynett.no> - 2016-07-26 12:44 +0200
Re: EXIT_SUCCESS Keith Thompson <kst-u@mib.org> - 2016-07-26 08:24 -0700
Re: EXIT_SUCCESS David Brown <david.brown@hesbynett.no> - 2016-07-26 19:26 +0200
Re: EXIT_SUCCESS BartC <bc@freeuk.com> - 2016-07-26 18:03 +0100
Re: EXIT_SUCCESS Ken Brody <kenbrody@spamcop.net> - 2016-07-11 19:15 -0400
Re: EXIT_SUCCESS supercat@casperkitty.com - 2016-07-11 16:46 -0700
Re: EXIT_SUCCESS raltbos@xs4all.nl (Richard Bos) - 2016-07-15 13:51 +0000
Re: EXIT_SUCCESS supercat@casperkitty.com - 2016-07-15 08:07 -0700
Re: EXIT_SUCCESS Ken Brody <kenbrody@spamcop.net> - 2016-07-15 14:33 -0400
Re: EXIT_SUCCESS raltbos@xs4all.nl (Richard Bos) - 2016-07-23 09:07 +0000
Re: EXIT_SUCCESS Randy Howard <rhoward.mx@EverybodyUsesIt.com> - 2016-07-23 16:44 -0500
Re: EXIT_SUCCESS Ken Brody <kenbrody@spamcop.net> - 2016-07-25 10:36 -0400
Re: EXIT_SUCCESS Randy Howard <rhoward.mx@EverybodyUsesIt.com> - 2016-07-25 15:28 -0500
Re: EXIT_SUCCESS Rosario19 <Ros@invalid.invalid> - 2016-07-18 09:45 +0200
Re: EXIT_SUCCESS gordonb.bitq1@burditt.org (Gordon Burditt) - 2016-07-08 17:56 -0500
Re: EXIT_SUCCESS Keith Thompson <kst-u@mib.org> - 2016-07-08 08:35 -0700
Re: EXIT_SUCCESS luser droog <luser.droog@gmail.com> - 2016-07-31 15:03 -0700
Re: EXIT_SUCCESS Real Troll <real.troll@trolls.com> - 2016-07-31 18:09 -0400
Re: EXIT_SUCCESS luser droog <luser.droog@gmail.com> - 2016-07-31 15:36 -0700
Re: EXIT_SUCCESS James Kuyper <jameskuyper@verizon.net> - 2016-08-01 10:09 -0400
Page 4 of 4 — ← Prev page 1 2 3 [4]
| From | raltbos@xs4all.nl (Richard Bos) |
|---|---|
| Date | 2016-07-15 13:51 +0000 |
| Message-ID | <5788ea50.22313031@news.xs4all.nl> |
| In reply to | #90243 |
Ken Brody <kenbrody@spamcop.net> wrote: > Speaking of BASIC and FORTRAN... > > One of my first significant programming projects was to rewrite a rather > hefty Star Trek program written in FORTRAN into a rather wimpy version of > BASIC. (Why? Because that's the only language that my high school had > available "way back when".) Surely not _the_ Star Trek program, as made famous by David Ahl? Because that was originally written in BASIC, not FORTRAN. Richard
[toc] | [prev] | [next] | [standalone]
| From | supercat@casperkitty.com |
|---|---|
| Date | 2016-07-15 08:07 -0700 |
| Message-ID | <f4c4a6a2-6e68-441e-9f79-9f1213a2f56b@googlegroups.com> |
| In reply to | #90396 |
On Friday, July 15, 2016 at 8:52:04 AM UTC-5, Richard Bos wrote: > Ken Brody wrote: > > One of my first significant programming projects was to rewrite a rather > > hefty Star Trek program written in FORTRAN into a rather wimpy version of > > BASIC. (Why? Because that's the only language that my high school had > > available "way back when".) > > Surely not _the_ Star Trek program, as made famous by David Ahl? Because > that was originally written in BASIC, not FORTRAN. That game has been widely ported (as I noted in another post, even the Atari Video Computer System got a version called Stellar Track). I would not doubt that it has been ported to many languages, or that people who got copies of the game in some of those languages may have ported it back to BASIC.
[toc] | [prev] | [next] | [standalone]
| From | Ken Brody <kenbrody@spamcop.net> |
|---|---|
| Date | 2016-07-15 14:33 -0400 |
| Message-ID | <nmbaan$mce$1@dont-email.me> |
| In reply to | #90396 |
On 7/15/2016 9:51 AM, Richard Bos wrote: > Ken Brody <kenbrody@spamcop.net> wrote: > >> Speaking of BASIC and FORTRAN... >> >> One of my first significant programming projects was to rewrite a rather >> hefty Star Trek program written in FORTRAN into a rather wimpy version of >> BASIC. (Why? Because that's the only language that my high school had >> available "way back when".) > > Surely not _the_ Star Trek program, as made famous by David Ahl? Because > that was originally written in BASIC, not FORTRAN. I believe this was "Super Star Trek", which looks like it actually originated as Mr. Ahl's "Star Trek". It used "words" (or probably abbreviations) for commands. It's quite possible that it was ported to FORTRAN, and that's the version I ported (back?) to BASIC. The version of BASIC we had was pretty primitive, having only 26 1-dimensional arrays, 26 strings, and 286 (A-Z, as well as A0-Z9) numeric variables. Fortunately, it had CHAIN and COMMON. Note that I have (somewhere) an autographed copy of his "101 BASIC Computer Games". -- Kenneth Brody
[toc] | [prev] | [next] | [standalone]
| From | raltbos@xs4all.nl (Richard Bos) |
|---|---|
| Date | 2016-07-23 09:07 +0000 |
| Message-ID | <579333c9.3106359@news.xs4all.nl> |
| In reply to | #90409 |
Ken Brody <kenbrody@spamcop.net> wrote: > The version of BASIC we had was pretty primitive, having only 26 > 1-dimensional arrays, 26 strings, and 286 (A-Z, as well as A0-Z9) numeric > variables. Fortunately, it had CHAIN and COMMON. Sheesh... that's even more restrictive than Sinclair Basic! > Note that I have (somewhere) an autographed copy of his "101 BASIC Computer > Games". Ooh... Richard
[toc] | [prev] | [next] | [standalone]
| From | Randy Howard <rhoward.mx@EverybodyUsesIt.com> |
|---|---|
| Date | 2016-07-23 16:44 -0500 |
| Message-ID | <nn0ofd$10bm$2@gioia.aioe.org> |
| In reply to | #90834 |
On 7/23/16 4:07 AM, Richard Bos wrote: > Ken Brody <kenbrody@spamcop.net> wrote: > >> The version of BASIC we had was pretty primitive, having only 26 >> 1-dimensional arrays, 26 strings, and 286 (A-Z, as well as A0-Z9) numeric >> variables. Fortunately, it had CHAIN and COMMON. > > Sheesh... that's even more restrictive than Sinclair Basic! > >> Note that I have (somewhere) an autographed copy of his "101 BASIC Computer >> Games". > > Ooh... > > Richard > Is that the one that had a bright yellow cover? If so, I think I had that in the mid to late 70s. -- Randy Howard (replace the obvious text in the obvious way if you wish to contact me directly)
[toc] | [prev] | [next] | [standalone]
| From | Ken Brody <kenbrody@spamcop.net> |
|---|---|
| Date | 2016-07-25 10:36 -0400 |
| Message-ID | <nn584i$9om$1@dont-email.me> |
| In reply to | #90882 |
On 7/23/2016 5:44 PM, Randy Howard wrote:
> On 7/23/16 4:07 AM, Richard Bos wrote:
>> Ken Brody <kenbrody@spamcop.net> wrote:
[...]
>>> Note that I have (somewhere) an autographed copy of his "101 BASIC Computer
>>> Games".
>>
>> Ooh...
>
> Is that the one that had a bright yellow cover? If so, I think I had that in
> the mid to late 70s.
No, it's mostly blue:
https://en.wikipedia.org/wiki/BASIC_Computer_Games
Are you perhaps thinking of "Basic BASIC"?
http://www.trs-80.com/covers/bookcover-Basic_BASIC_2nd_Edition_(1978)(Hayden_Book_Company).jpg
(That was my first computer programming book, though it must have been the
first edition, as it would have been before 1978.)
[clickety click]
Or maybe "BASIC Computer Games: Microcomputer Edition", also by David Ahl?
https://www.amazon.com/BASIC-Computer-Games-Microcomputer-David/dp/0894800523
Several of these are available online as PDF downloads, though I won't link
to them here, as I'm not 100% certain that they are legal.
--
Kenneth Brody
[toc] | [prev] | [next] | [standalone]
| From | Randy Howard <rhoward.mx@EverybodyUsesIt.com> |
|---|---|
| Date | 2016-07-25 15:28 -0500 |
| Message-ID | <nn5spv$1pg0$2@gioia.aioe.org> |
| In reply to | #90999 |
On 7/25/16 9:36 AM, Ken Brody wrote: > Or maybe "BASIC Computer Games: Microcomputer Edition", also by David Ahl? > > > https://www.amazon.com/BASIC-Computer-Games-Microcomputer-David/dp/0894800523 > > Several of these are available online as PDF downloads, though I won't > link to them here, as I'm not 100% certain that they are legal. Ah yes, that's the one I was thinking of. I had that very long ago. -- Randy Howard (replace the obvious text in the obvious way if you wish to contact me directly)
[toc] | [prev] | [next] | [standalone]
| From | Rosario19 <Ros@invalid.invalid> |
|---|---|
| Date | 2016-07-18 09:45 +0200 |
| Message-ID | <n32pobt36v71cs6v6a59n79gvv83mmdf1e@4ax.com> |
| In reply to | #90136 |
On 9 Jul 2016 11:31:13 GMT, ram@zedat.fu-berlin.de wrote:
>public final class Main
>{
> public static java.lang.String english( final int a )
> { java.lang.String result;
> if( a == 0 )result = "zero";
> if( a == 1 )result = "one";
> if( a == 2 )result = "two";
> if( a == 3 )result = "three";
> else result = "four";
> return result; }
if(a==0) result= "zero";
else if(a==1) result= "one";
else if(a==2) result= "two";
else if(a==3) result= "three";
else result= "four";
>
> public static void print( final int a )
> { java.lang.System.out.println( english( a )); }
>
> public static void main( final java.lang.String[] args )
> { print( 0 ); print( 1 ); print( 2 ); print( 3 ); print( 4 ); }}
>
> Everyone said »zero, one, two, three, four«.
>
> But it will print »four, four, four, three, four«.
>
> One student said that it would have the presumably
> intended effect if it would have been written as:
>
>public static java.lang.String english( final int a )
>{ java.lang.String result;
> if( a == 0 )return "zero";
> if( a == 1 )return "one";
> if( a == 2 )return "two";
> if( a == 3 )return "three";
> else return "four"; }
>
> So, this might mean that, in this special case, an
> »early return« would be more readable.
>
> From my point of view, however, it means that both
> »final« (i.e., »const«) and »?:« would also have
> helped to avoid the presumed mistake, retaining the
> single return.
[toc] | [prev] | [next] | [standalone]
| From | gordonb.bitq1@burditt.org (Gordon Burditt) |
|---|---|
| Date | 2016-07-08 17:56 -0500 |
| Message-ID | <9tWdnZtknbUKsh3KnZ2dnUU7-IfNnZ2d@posted.internetamerica> |
| In reply to | #90125 |
> In structured programming you can never have the line > > return EXIT_FAILURE; > > You can write "return EXIT_SUCCESS" if the program has no failure modes it > can detect, but not "return EXIT_FAILURE"; An exception to this is the UNIX program "false" (typically found in /bin or /usr/bin). "false" is also a builtin in some shells. It's the opposite of the "true" command. It is not at all uncommon for a program other than just shells to run a (user-supplied) command line, then act on the returned status. "make" is one of the obvious examples of this. Having a command that always fails is good for checking error handling, or for dealing with hardware that hasn't arrived yet.
[toc] | [prev] | [next] | [standalone]
| From | Keith Thompson <kst-u@mib.org> |
|---|---|
| Date | 2016-07-08 08:35 -0700 |
| Message-ID | <lnlh1cm9ba.fsf@kst-u.example.com> |
| In reply to | #90116 |
Real Troll <real.troll@trolls.com> writes:
> In C instead of using return 0; we can write EXIT_SUCCESS; so the
> question is:
>
> Is it
>
> EXIT_SUCCESS;
>
> or
>
> EXIT_SUCCESS();
I'm going to assume that your chosen pseudonym "Real Troll"
is accurate.
If that assumption is accurate, please go away. If not, and if you
have a serious question, I suggest asking it using a different name.
--
Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
[toc] | [prev] | [next] | [standalone]
| From | luser droog <luser.droog@gmail.com> |
|---|---|
| Date | 2016-07-31 15:03 -0700 |
| Message-ID | <436e5f12-9ea1-46b7-bfd9-2a98abf2757b@googlegroups.com> |
| In reply to | #90130 |
On Friday, July 8, 2016 at 10:36:03 AM UTC-5, Keith Thompson wrote: > Real Troll <real.troll@trolls.com> writes: <snip oddly-grammared but otherwise on-topic OP> > > I'm going to assume that your chosen pseudonym "Real Troll" > is accurate. This was also my initial assumption, but this and the more recent "tmain" thread give me pause. I recall for the group that my initial pseudonym was luserXtroll While the 'luser' component was drawn from the Hacker's Dictionary crossed with Hermann Hesse, I did not fully appreciate the specifics of the connotations of the "troll" appellation. I learned later the word 'troglodyte' and evolved the 'troll' component into 'trogg'. > If that assumption is accurate, please go away. If not, and if you > have a serious question, I suggest asking it using a different name. I second the second suggestion. I suspect the use of 'troll' here is possibly a sort of Standard Disclaimer. Indeed the modifier 'real' suggests to me that OP intends a more fairy-tale association to the word. Something more like Shrek, perhaps, but "real", you know? To OP: please consider 'troglodyte' or 'neo-luddite' or some such for a better reception to your material. -- a fondness for goat-flesh? a part-time tollbooth operator? an unsuccessful car salesperson?
[toc] | [prev] | [next] | [standalone]
| From | Real Troll <real.troll@trolls.com> |
|---|---|
| Date | 2016-07-31 18:09 -0400 |
| Message-ID | <nnltbs$1pd$1@gioia.aioe.org> |
| In reply to | #91432 |
On 31/07/2016 23:03, luser droog wrote:
> On Friday, July 8, 2016 at 10:36:03 AM UTC-5, Keith Thompson wrote:
this one works alright with EXIT_SUCCESS
>
>
> #include <iostream.h>
> #include <conio.h>
> #pragma hdrstop
> #pragma argsused
> int main(int argc, char* argv[])
> {
> char FirstName[12], LastName[12];
> cout << "Enter First Name: "; cin >> FirstName;
> cout << "Enter Last Name: "; cin >> LastName;
> clrscr();
> cout << "Full Name: " << FirstName << " " << LastName;
> cout << "\n\nPress any key to continue...";
> getchar();
> return EXIT_SUCCESS;
> }
[toc] | [prev] | [next] | [standalone]
| From | luser droog <luser.droog@gmail.com> |
|---|---|
| Date | 2016-07-31 15:36 -0700 |
| Message-ID | <1825f4e2-0e82-4075-843a-a7ef8c15350d@googlegroups.com> |
| In reply to | #91432 |
On Sunday, July 31, 2016 at 5:03:20 PM UTC-5, luser droog wrote: > I recall for the group that my initial pseudonym was > luserXtroll > > While the 'luser' component was drawn from the Hacker's > Dictionary crossed with Hermann Hesse, I did not fully > appreciate the specifics of the connotations of the "troll" > appellation. I learned later the word 'troglodyte' and > evolved the 'troll' component into 'trogg'. > BTW, 'luser' is the surname. Like Bajoran.
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2016-08-01 10:09 -0400 |
| Message-ID | <nnnl65$r8j$1@dont-email.me> |
| In reply to | #91432 |
On 07/31/2016 06:03 PM, luser droog wrote: ... > Dictionary crossed with Hermann Hesse, I did not fully > appreciate the specifics of the connotations of the "troll" > appellation. I learned later the word 'troglodyte' and > evolved the 'troll' component into 'trogg'. The way you worded that could be confusing to someone unsure of the origins of the word "troll" on the internet. The internet meaning of "troll" as a verb is #8 at <https://en.wiktionary.org/wiki/troll#Verb>, and I believe that it evolved from meaning #3, rather than having anything to do with meaning #1 at <https://en.wiktionary.org/wiki/troll#Noun>. The internet meaning of "troll" as a noun is #2 at <https://en.wiktionary.org/wiki/troll#Noun_2>. The writer of that article seems to agree, since the two internet meanings are grouped together with the one referring to fishing, in a section separate from the one about grotesque humanoids.
[toc] | [prev] | [standalone]
Page 4 of 4 — ← Prev page 1 2 3 [4]
Back to top | Article view | comp.lang.c
csiph-web