nrouquet@pollux.usc.edu (Nicolas Rouquette) (02/10/89)
In the Advanced User's Guide pp 5-6 there is an example showing how to allocate storage for a string by allocating a pointer to an array of characters. The size of that arrayy is 1 plus the length of the string to put in it (because strings are null terminated). After making that pointer, they use (setf (foreign-string-value <pointer>) <string>) to copy the <string> into the newly allocated storage. In page 5-42, the same thing is done but the length of the array is set to 8. The example also shows (setf (foreign-string-value <pointer>) "12345678") Question: Assuming that "12345678" is also null terminated, why the second array is of size 8 and not 9 as the first example suggests? Nicolas Rouquette nrouquet%pollux.usc.edu@oberon.usc.edu Distributed AI group Univ. of S. Calif. Los Angeles, CA 90089-0782 `