Tue Oct 14, 2003 3:10 am
Hi,
just noted that ACC does not handle pre-decrement, à la --some_array[i]. Whether this holds true for single variables like --x too, I did not check.
Tue Oct 14, 2003 5:42 am
Who cares?
Tue Oct 14, 2003 9:16 am
ACC is not as robust as C, and wasn't designed to be. The prefixed decrament is easily gotten around, anyway.
Tue Oct 14, 2003 11:34 am
That's essential!
Changed Topic: Pre-Decrement and Pre-Increment do not work when applied to array members.
Tue Oct 14, 2003 11:36 am
It does not support predecrement of arrays if you try to use it as a stand-alone operator. (That is, you don't use the result of the operation in any way.) All that means is that you cannot do something like this:
- Code:
--foo[3];
But since that is completely equivalent to the following, I don't see this as much of a problem:
- Code:
foo[3]--;
The following works just fine:
- Code:
int a = --foo[3];
Note that this also applies to preincrement, and only to arrays.
Tue Oct 14, 2003 11:42 am
I like pre* more than post
Tue Oct 14, 2003 7:21 pm
Hirogen2 wrote:I like pre* more than post

Is that because of K&R?
Wed Oct 15, 2003 2:07 am
I dislike K&R (what of K&R anyway?) I cannot tell... some personal favor without a reason. Looks better!?
Wed Oct 15, 2003 9:10 am
"make foo one less" looks even better. Shall we change the official command to that?
Wed Oct 15, 2003 5:41 pm
HotWax wrote:"make foo one less" looks even better. Shall we change the official command to that?
And while you do that, make a scripting language that uses plain english sentences("Raise the floor tagged 45 100 units at 10 eighth-units per tic.") rather than complicated commands("floor_raisebyvalue(45, 10, 100);").
Wed Oct 15, 2003 9:08 pm
Destroyer wrote:HotWax wrote:"make foo one less" looks even better. Shall we change the official command to that?
And while you do that, make a scripting language that uses plain english sentences("Raise the floor tagged 45 100 units at 10 eighth-units per tic.") rather than complicated commands("floor_raisebyvalue(45, 10, 100);").
Raise the whatty by the howdy? Tags? Units? That's confusing!!!
How about:
"Raise the floor over yonder by about half the height of my 6-year old daughter at the speed of my grandma in her old rocker."
Wed Oct 15, 2003 9:11 pm
HotWax wrote:Destroyer wrote:HotWax wrote:"make foo one less" looks even better. Shall we change the official command to that?
And while you do that, make a scripting language that uses plain english sentences("Raise the floor tagged 45 100 units at 10 eighth-units per tic.") rather than complicated commands("floor_raisebyvalue(45, 10, 100);").
Raise the whatty by the howdy? Tags? Units? That's confusing!!!
How about:
"Raise the floor over yonder by about half the height of my 6-year old daughter at the speed of my grandma in her old rocker."
XD
Thu Oct 16, 2003 3:39 pm
Hirogen2 wrote:I dislike K&R (what of K&R anyway?) I cannot tell... some personal favor without a reason. Looks better!?
What's there to dislike with K&R?
I prefer the post-increment (decrement - whatever) operator better. I find I use it more, but not only that, I think it looks better than the pre-increment operator.
Thu Oct 16, 2003 3:46 pm
Mannequin wrote:What's there to dislike with K&R?

Aside that their indent style does not match mine (to a specific degree)

and that the book is not free like other C tutorials, if I think about it, nothing, it is like... anything else, no + no -.
And yeah, IIRC they used post-increment!
Thu Oct 16, 2003 11:06 pm
Personal preference is to use pre or post at the beginning or end respectively of a block of code, anywhere that it really doesn't matter. Of course where there are side effects or more specific actions like in a for() statement, do what makes sense--this is just where it's otherwise completely immaterial which is used. (no, I didn't post-decrement "sense" or pre-decrement "this" in the sentence above
- Code:
++i;
j=foo(i+arg2);
j--;
Powered by phpBB © phpBB Group.
phpBB Mobile / SEO by Artodia.