Pop_r3fp32Stack Subroutine

public subroutine Pop_r3fp32Stack(stack, tok)

Arguments

TypeIntentOptionalAttributesName
class(r3fp32Stack), intent(inout) :: stack
real(kind=real32), intent(out) :: tok(:,:,:)

Contents

Source Code


Source Code

  subroutine Pop_r3fp32Stack(stack,tok)
    class(r3fp32Stack),intent(inout) :: stack
    real(real32),intent(out)        :: tok(:,:,:)

    if(stack%top_index <= 0) then
      print*,"Attempt to pop from empty token stack"
    else
      tok(:,:,:) = stack%tokens(:,:,:,stack%top_index)
      stack%top_index = stack%top_index-1
    endif

  endsubroutine Pop_r3fp32Stack