XtNumber man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

XtNumber()							    XtNumber()

Name
  XtNumber - determine the number of elements in a fixed-size array.

Synopsis
  Cardinal XtNumber(array)

Inputs
  array	    Specifies a fixed-size array of arbitrary type.

Returns
  The number of elements in array.

Description
  XtNumber()  returns  the  number  of elements in the specified argument
  list, resource list, or other fixed-size  array.   It	 works	only  for
  objects which have been statically initialized or declared with a fixed
  number of elements, i.e., arrays whose total size is known  at  compile
  time.

Usage
  You  should use XtNumber() whenever you are passing a static array to a
  function or storing an static array in a structure  that  also  expects
  the  number of elements in the array.	 This way, if you change the num‐
  ber of element in the array, the correct number of elements will  auto‐
  matically be compiled in.

Background
  XtNumber() is a macro defined as follows:

     #define XtNumber(arr)  ((Cardinal) (sizeof(arr) / sizeof(arr[0])))

See Also
  XtOffset(1), XtOffsetOf(1), XtSetArg(1).

Xt - Argument Lists						    XtNumber()
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net