Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #10638
| From | Ecki <ecki@intershop.de> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Sum of squares |
| Date | 2012-03-29 09:05 +0200 |
| Organization | INTERSHOP Communications |
| Message-ID | <20120329090557.4d71217b@tiger.support.j.intershop.de> (permalink) |
| References | <10851509008435@frunobulax.edu> <20120327161515.705ef8f4@tiger.support.j.intershop.de> <17190721.475.1332858914383.JavaMail.geo-discussion-forums@ynlw24> <9173418.355.1332860448639.JavaMail.geo-discussion-forums@ynjc20> |
Thanks a lot for the answers. > > Yes, but if you want a one-liner take: > > > > : result 2dup > if swap then dup * -rot max dup * + ; As I already wrote, I'm just a bloody beginner. Wasn't aware of max nor -rot (maybe as a matter of ignorance). > And if you want it documented, set your editor's right margin to > column 120. Insert the stack picture and place the \ explanation of > what it does at column 65. > > With comments at column 65, it's like having shadow blocks. > Programmers who find comments distracting can always drag the editor > window edge until only the code shows. My FHD screen (the new VGA) > allows two 124-column edit windows side by side and I use them, since > I don't find comments distracting. That looks to me a bit as coming from mainframe programming. Regarding the pure value of comments, I had to admit that I learned it the hard way. IMO, however one likes it, at least sometimes comments make the life much easier, even when modifying/extending your own code the year after... can't imagine that it's different in Forth. Of course, comments have to be both correct and meaningful. Ecki
Back to comp.lang.forth | Previous | Next — Previous in thread | Find similar
Sum of squares mhx@iae.nl (Marcel Hendrix) - 2012-03-26 20:50 +0200
Re: Sum of squares "A. K." <akk@nospam.org> - 2012-03-26 21:43 +0200
Re: Sum of squares Paul Rubin <no.email@nospam.invalid> - 2012-03-26 16:52 -0700
Re: Sum of squares Helmar Wodtke <helmwo@gmail.com> - 2012-03-27 03:15 -0700
Re: Sum of squares Paul Rubin <no.email@nospam.invalid> - 2012-03-28 08:16 -0700
Re: Sum of squares BruceMcF <agila61@netscape.net> - 2012-03-28 06:06 -0700
Re: Sum of squares Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2012-03-27 12:13 +0100
Re: Sum of squares Helmar Wodtke <helmwo@gmail.com> - 2012-03-27 04:03 -0700
Re: Sum of squares Zbiggy <zbigniew2011REMOVE@gmail.REMOVE.com> - 2012-03-27 13:55 +0100
Re: Sum of squares Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-03-27 11:05 +0000
Re: Sum of squares Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-03-28 11:41 +0000
Re: Sum of squares Paul Rubin <no.email@nospam.invalid> - 2012-03-28 07:41 -0700
Re: Sum of squares mhx@iae.nl (Marcel Hendrix) - 2012-03-29 22:06 +0200
Re: Sum of squares Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-03-31 11:48 +0000
Re: Sum of squares Alexander Adler <alexander.adler@stud.uni-frankfurt.de> - 2012-03-29 19:33 +0200
Re: Sum of squares Helmar Wodtke <helmwo@gmail.com> - 2012-03-29 11:16 -0700
Re: Sum of squares Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-04-03 09:47 +0000
Re: Sum of squares Helmar Wodtke <helmwo@gmail.com> - 2012-03-28 09:42 -0700
Re: Sum of squares Helmar Wodtke <helmwo@gmail.com> - 2012-03-28 11:08 -0700
Re: Sum of squares Ecki <ecki@intershop.de> - 2012-03-27 16:15 +0200
Re: Sum of squares Helmar Wodtke <helmwo@gmail.com> - 2012-03-27 07:35 -0700
Re: Sum of squares hwfwguy@gmail.com - 2012-03-27 08:00 -0700
Re: Sum of squares Helmar Wodtke <helmwo@gmail.com> - 2012-03-27 08:21 -0700
Re: Sum of squares Ecki <ecki@intershop.de> - 2012-03-29 09:05 +0200
csiph-web