On Thursday, August 14, 2008 at 03:29:28 (-0700) Jerry writes: > Just a note that I can't seem to fix the problem in Ada example 17 > (stripchart demo) wherein all of the legend strings appear on the > plot identical to the fourth one. I've tried a lot of things and at > this point I'm afraid it will have to be a "known issue." > > The crux is matching e.g. this declaration in x17c.c: const char > *legline[4]. > > I suppose this is a pointer to a four-element array of pointers to > char which are to be interpreted as strings, probably with null > terminators. (How does one know for sure?) This concept is reinforced > by the documentation on plstripc. This is the current structure in > the Ada bindings--a four-element array of pointers to null-terminated > strings.
That is the correct interpretation. > I don't understand what the const in the above declaration does. I > would think that it would cause the declared thing to be read-only, > acquiring its values in the declaration itself, but it is in fact > assigned to later in the program. For C & C++, a const pointer means the memory it points to cannot be altered. The pointer can. So for example const char *foo = "bar"; (or later reassignment) is perfectly legit. -- Maurice LeBrun ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel