VARGSIZE

VARGSIZE returns the number of bytes that a variable would occupy on the stack if it were passed BYVALUE.

Read syntax diagramSkip visual syntax diagramVARGSIZE( x)
x
A variable of any data type, data organization, alignment, and storage class, except as listed below.
x cannot be:
  • A BASED, DEFINED, parameter, subscripted, or structure or union base-element variable that is an unaligned fixed-length bit string
  • A minor structure or union whose first or last base element is an unaligned fixed-length bit string (except where it is also the first or last element of the containing major structure or union)
  • A major structure or union that has the BASED, DEFINED, or parameter attribute, and which has an unaligned fixed-length bit string as its first or last element
  • A variable not in connected storage

VARGSIZE(x) returns the number of bytes that x would occupy on the stack if it were passed BYVALUE. This value will be at least as large as SIZE(x); it will be larger if the value returned by SIZE(x) needs to be rounded up to a 4-byte multiple.

VARGSIZE is meant to be used only inside a procedure whose last parameter has the LIST attribute.