A question for C/C++ coders
Posted: Fri Jan 16, 2004 5:23 pm
Hi,
I'm converting some C++ code to PB and, even though i have a little knowledge of C/C++, i have a doubt on the following lines :
Does it mean that the variable StackTop is actually incremented by 1 or does it only refer to the value StackTop + 1 ?
If the variable is really incremented, i would translate it like this in PB :
if it's not incremented, like this :
Is this correct ?
I also got the same problem with another line of code :
Does the variable StackTop is decremented or is it only a reference to the value StackTop - 1 ?
If any C/C++ gurus could give me hint, i would be most grateful
Pythagoras
I'm converting some C++ code to PB and, even though i have a little knowledge of C/C++, i have a doubt on the following lines :
Code: Select all
Stack[StackTop++]=PrevPixel;
If the variable is really incremented, i would translate it like this in PB :
Code: Select all
StackTop+1 : Stack(StackTop) = PrevPixel
Code: Select all
Stack(StackTop+1) = PrevPixel
I also got the same problem with another line of code :
Code: Select all
RetVal = Stack[--StackTop]
If any C/C++ gurus could give me hint, i would be most grateful

Pythagoras