Changes between Version 5 and Version 6 of Libraries
- Timestamp:
- 05/22/23 14:24:44 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Libraries
v5 v6 1 1 = CIVL Libraries 2 2 3 Coming soon. 3 In progress. 4 5 == `bundle` 6 7 CIVL-C includes a type named `$bundle`, declared in the CIVL-C standard header 8 [https://vsl.cis.udel.edu/trac/civl/browser/CIVL/trunk/mods/dev.civl.abc/src/include/headers/bundle.cvh bundle.cvh]. 9 10 A bundle is a sequence of objects of the same type, wrapped into an atomic package. A bundle is created using a function that specifies a region of memory. One can create a bundle from an array of integers, and another bundle from an array of reals. Both bundles have the same type, `$bundle`. They can therefore be entered into an array of `$bundle`, for example. Hence bundles are useful for mixing objects of different (even statically unknown) types into a single data structure. Later, the contents of a bundle can be extracted with another function that specifies a region of memory into which to unpack the bundle; if that memory does not have the right type to receive the contents of the bundle, a runtime error occurs. 4 11 5 12 6 13 7 == `bundle.cvh`8 9 CIVL-C includes a type named `$bundle`, declared in the CIVL-C standard header `bundle.cvh`. A bundle is basically a sequence of data, wrapped into an atomic package. A bundle is created using a function that specifies a region of memory. One can create a bundle from an array of integers, and another bundle from an array of reals. Both bundles have the same type, `$bundle`. They can therefore be entered into an array of `$bundle`, for example. Hence bundles are useful for mixing objects of different (even statically unknown) types into a single data structure. Later, the contents of a bundle can be extracted with another function that specifies a region of memory into which to unpack the bundle; if that memory does not have the right type to receive the contents of the bundle, a runtime error is generated. The bundle type and its functions are provided by the library `bundle.cvh`.10 The relevant functions for creating and manipulating bundles are given in ...11 14 12 15
