User Tools

Site Tools


jvs:cigal:manual:chapter3:size

CIGAL Reference Manual, Chapter 3 (Functions): SIZE

SIZE -- Return the number of elements in a variable

usage: result = size(varb,[mode])

VARB can be any CIGAL variable or string. The RESULT depends upon the value of MODE, which defaults to 0 if not explicitly specified.

 MODE           RESULT
  0             the number of elements in VARB, in each dimension
  1             if VARB is a character string, the size of the file named VARB
  2             the number of dimensions in VARB
  3             the total number of elements in VARB
  4             the rectangle bounds of VARB if VARB is a Window name 
 -1             the size of the 1st (X) dimension
 -2             the size of the 2nd (Y) dimension
 -3             the size of the 3rd (Z) dimension
                 (note: value 1 is returned if -MODE is more than the actual
                  number of dimensions).

NOTE: If VARB is an unrecognized variable name, then SIZE returns -1. This can be a useful method of determining whether global variables have already been declared.

See Also:
CIGAL Home, CIGAL Manual, Functions List, Manual Help

jvs/cigal/manual/chapter3/size.txt · Last modified: 2023/02/23 18:43 (external edit)