Francois Schoubben wrote:
For the main tests, i hope it's the end... Up to you to correct my tests... http://www.info.fundp.ac.be/~fsc/dvpt/fsc.tar.gz or, "online" http://www.info.fundp.ac.be/~fsc/dvpt/
Sorry for the late reply.
fsc31-35 : actual schema discriminant
What's missing is a test where the formal discriminants are of a subrange type and the actual discriminants (in `New' or a variable declaration) are out of range.
fsc36-37 : "for loops", i'm not sure it's what you expect...
Yes (I'm only adding cases for the lower bound).
For asm target, i have a problem... The only "assembler language" i know is MIX (thanks D. Knuth :-) )... And i haven't really got time to learn it before... long time i'm afraid... Can anybody help here???
It's hard to impossible to write them portably, of course, but a platform specific one (perferably IA32) should be enough (since the range checking issues are the same everywhere). Perhaps someone who uses asm can write one (range-checking would occur when using a subrange variable as a target).
For the remaining... What's missing?
Initialization of types, variables and typed constants. (I.e., variables (or fields) or subrange type with an out-of-range initializer; must be locally, otherwise GPC won't accept non-constants initializers.)
wrong?
I've corrected a few details, nothing serious.
The `FillChar' test (fsc20.pas) shouldn't (I think) work like this since it takes an untyped parameter. (Some people (ab)use it for strange purposes.) Instead, the 3rd parameter may also be an integer, so it's an error if it's < 0 or > Ord (MaxChar).
misunderstood?
`WRONG' is only for compile-time failures. I've removed it.
I've never played with delphi extensions, the OO language i used was java.
I don't think there's anything about objects needed here.
Frank