| Author |
Message |
alehandro
Joined: 16 Nov 2010 Posts: 35
|
Posted: Thu Jan 13, 2011 9:31 pm Post subject: Operator ++ |
|
|
instead of formatting source as
case 14:
return (structc5 = op_Decrement(structc5));
would be much better to decode as
case 14:
return ++structc5;
where structc5 is a local var on stack |
|
| Back to top |
|
 |
alehandro
Joined: 16 Nov 2010 Posts: 35
|
Posted: Sat Jan 29, 2011 11:02 am Post subject: |
|
|
any comments here?
OK, I'll show the code below (not compilable) and how I fixed it (after):
before
struct09c structc5 = structcArray[0];
.......
case 13:
return (structc5 = op_Increment(structc5));
case 14:
return (structc5 = op_Decrement(structc5));
after
case 13:
return ++structc5;
case 14:
return --structc5;
struct09c is rather complex, but is has the operators:
eg:
public static struct09c operator ++(struct09c p0)
{
return (p0 + f0002c5);
}
public static struct09c operator --(struct09c p0)
{
return (p0 - f0002c5);
} |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group