According to Frank Heckenbach:
[...] Then perhaps it would be useful to allow the same syntax also for ShortStrings (additionally), just as if ShortString[n] was declared as:
record case boolean of false:(CurrentLength:byte); true:(string:array[0..n] of char); end;
Also, it could be good to provide a (read-only) "pseudo field" Capacity. [...] These two things would make ShortStrings more similar to (and often exchangeable with) LongStrings, without giving up BP compatibility.
Good ideas, but a lot of work ...
(BTW: LongStrings' Capacity is always read-only, isn't it?)
It is not. Probably it should be - somebody knows? And for other schema discriminants?
BP 7.0 allows this via High(s) -- is something like BP's High and Low functions (to give the lower and upper bounds of arrays and subrange types) present or planned for gpc? [...]
Yes.
[...] So, perhaps better forget about the #0 with ShortStrings, and add it when converting to other strings...
I think that's the way to go.
But UCSD was non-standard, too, wasn't it? Just out of curiosity, it doesn't really matter to me.
UCSD Pascal was developed at the University of California San Diego (UCSD), not by a company, that's why I consider it as a well-defined standard, although no ISO standard. I have read about a company "SofTech" distributing UCSD Pascal, and I got mine from Apple as "Apple Pascal". If somebody has some more exact information, I would be glad to know.
Greetings,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201] maintainer GNU Pascal [970420] - http://home.pages.de/~gnu-pascal/ [970125]
Hello, Peter Gerwinski! You wrote:
According to Frank Heckenbach:
But UCSD was non-standard, too, wasn't it? Just out of curiosity, it doesn't really matter to me.
UCSD Pascal was developed at the University of California San Diego (UCSD), not by a company, that's why I consider it as a well-defined standard, although no ISO standard. I have read about a company "SofTech" distributing UCSD Pascal, and I got mine from Apple as "Apple Pascal". If somebody has some more exact information, I would be glad to know.
Cabot software sells "Cabot UCSD Pascal" - which is available for Dos, OS/2, various unix platforms, and (I think) Win32. It produces portable p-code as well.
Warmest regards, The Chief --------- Dr. Abimbola A. Olowofoyeku (The African Chief and The Great Elephant) Keele University, England (Email: laa12@cc.keele.ac.uk) Author of: Chief's Installer Pro v3.50 for Win16 and Win32 Homepage: http://ourworld.compuserve.com/homepages/African_Chief/