Navigation
Navigate Navigate Navigate Navigate

IfcListToArray

Definition from ISO/CD 10303-42:1992: The function converts a generic list to an array with pre-determined array bounds. If the array bounds are incompatible with the number of elements in the original list a null result is returned. This function is used to construct the array of control points and weights used in the b-spline entities.

NOTE  Corresponding STEP function: list_to_array. Please refer to ISO/IS 10303-42:1994, p.119 for the final definition of the formal standard. 

HISTORY  New function in IFC Release 2x Edition 2

EXPRESS specification:

FUNCTION IfcListToArray
(Lis : LIST [0:?] OF GENERIC : T;
       Low,U : INTEGER) : ARRAY OF GENERIC : T;
   LOCAL
     N   : INTEGER;
     Res : ARRAY [Low:U] OF GENERIC : T;
   END_LOCAL;
      
   N := SIZEOF(Lis);
   IF (N <> (U-Low +1)) THEN
     RETURN(?);
   ELSE
     Res := [Lis[1] : N];
     REPEAT i := 2 TO N;
       Res[Low+i-1] := Lis[i];
     END_REPEAT;
     RETURN(Res);
   END_IF;
END_FUNCTION;