*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> Tcl/foreach (3)              
Title
Content
Arch
Section
 

Contents


foreach(3Tcl)							 foreach(3Tcl)


NAME    [Toc]    [Back]

     foreach - Iterate over all	elements in a list

SYNOPSIS    [Toc]    [Back]

     foreach varname list body

DESCRIPTION    [Toc]    [Back]

     In	this command varname is	the name of a variable,	list is	a list of
     values to assign to varname, and body is a	Tcl script.  For each element
     of	list (in order from left to right), foreach assigns the	contents of
     the field to varname as if	the lindex command had been used to extract
     the field,	then calls the Tcl interpreter to execute body.	 The break and
     continue statements may be	invoked	inside body, with the same effect as
     in	the for	command.  Foreach returns an empty string.

KEYWORDS    [Toc]    [Back]

     foreach, iteration, list, looping


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
lreplace IRIX Replace elements in a list with new elements
XmListReplaceItemsPos Tru64 A List function that replaces the specified elements in the list
XmListReplaceItemsPos HP-UX A List function that replaces the specified elements in the list
XmListReplaceItems HP-UX A List function that replaces the specified elements in the list
XmListReplaceItemsPos IRIX A List function that replaces the specified elements in the list
XmListReplaceItems IRIX A List function that replaces the specified elements in the list
XmListReplaceItems Tru64 A List function that replaces the specified elements in the list
lsort IRIX Sort the elements of a list
linsert IRIX Insert elements into a list
llength IRIX Count the number of elements in a list
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service