Link to home
Start Free TrialLog in
Avatar of Max_AJApplegarth
Max_AJApplegarth

asked on

Code implementing

Hi,

i have the following piece of code but cannot find out what
Pos
Ret
Temp

are asking for me to return can anyone give me any hints?

function LASTAT(s,num)
{       /* XImp  */
var pos in Int
var ret in Int
var temp in Stack of Int
temp <-- s
for (pos <-- 0 to 4)
{
  if (PEEK(temp) == num) then
    {  ret <-- pos  }
  temp <-- POP(temp)
}
return ret
}


Thanks
max
ASKER CERTIFIED SOLUTION
Avatar of ADSLMark
ADSLMark

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial