No, just no. Such a declaration is an absolute accident waiting to happen as the compiler is free to place the two constant where it wants and if it thinks that a third, completely unrelated constant fits nicely between charconst1 and charconst2 than it will do so, thus breaking your array.
Maybe it's best for you to explain what you want to achieve in the end instead of posting strange abuses of array, absolute and PChar. This way we could try to find a solution that's efficient, but also maintainable.
What I want couldn't be any simpler, I want to have the count of characters in a constant array of characters _at compile time_ (the compiler has that information but, it won't give it up). Nothing particularly extravagant, parallel to sizeof(sometype) but for constant arrays. Having those constants would be helpful, just as having high/low of an array allows other arrays/data types to be "customized" to fit them. Nothing "strange" in that.
As far as the use of absolute in that way, I agree with you but, I was willing to pull the compiler's teeth if necessary to, at least, find out if there was a way to get the values.
Also, I don't care where the compiler chooses to put the constants. I simply wish it would provide a way for the programmer to obtain their size/(length in this case.) Just as it does for most everything else.
It would be nice (and useful) if those values could be obtained at compile time but, since that is apparently not possible, I'll get their size at runtime (without abusing the compiler
) pretty length or pretty strlen with a cherry on the top.