## Tcl8.6.17/Tk8.6.17 Documentation > [incr Tcl] Package C API, version 4.3.4 > Stack

### Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API

### NAME

Itcl_InitStack, Itcl_DeleteStack, Itcl_PushStack, Itcl_PopStack, Itcl_PeekStack, Itcl_GetStackValue, Itcl_GetStackSize — Manipulate an Itcl stack object.

### SYNOPSIS

#include <itcl.h>
int
Itcl_InitStack(stack)
int
Itcl_DeleteStack(stack)
int
Itcl_PushStack(cdata, stack)
void *
Itcl_PopStack(stack)
void *
Itcl_PeekStack(stack)
void *
Itcl_GetStackValue(stack, pos)
int
Itcl_GetStackSize(stack)

### 引数 ARGUMENTS

Itcl_Stack *stack (入力in)
  情報構造の棚｡　　　　 Stack info structure.

int pos (入力in)
  棚内の頂上からの順番｡　　　 position in stack order from the top.

void *clientData (入力in)
  棚内に保存された任意の一語の値｡　　　　 Arbitrary one-word value to save in the stack.

### 説明 DESCRIPTION

Itcl_InitStack は棚構造を初期化し､ Itcl_DeleteStack はそれを消去する｡ Itcl_PushStack は cdata 値を棚上に押込む｡ Itcl_PopStack は最も頂上にある cdata を取除いて持帰る｡ Itcl_PeekStack は最も頂上にある値を持帰るが､取除かない｡ Itcl_GetStackValue は棚内部から索引指定された値を得る｡索引指定 "0" 番は棚に押込まれた最初の値である｡ Itcl_GetStackSizeは棚上の入場物の個数を返す｡ Itcl_InitStack initializes a stack structure and Itcl_DeleteStack deletes it. Itcl_PushStack pushes the cdata value onto the stack. Itcl_PopStack removes and returns the top most cdata value. Itcl_PeekStack returns the top most value, but does not remove it. Itcl_GetStackValue gets a value at some index within the stack. Index "0" is the first value pushed onto the stack. Itcl_GetStackSize returns the count of entries on the stack.

### KEYWORDS

stack
Copyright © 1993-1998 Lucent Technologies, Inc.