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/
fsc01-05 : array R/W fsc06-10 : packed array R/W fsc11 : array in a record (just one, i dont think it's usefull :) ) fsc12 : enum fsc13-14 : string (R/W) fsc15-16 : range write (integer and char) fsc 17-18 : functions and range fsc 19-25 : predefined functions (chr, fillchar, ...) fsc26-27 : conformant array R/W fsc28-30 : slice array fsc31-35 : actual schema discriminant
fsc36-37 : "for loops", i'm not sure it's what you expect...
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???
For the remaining... What's missing? wrong? misunderstood?
I've never played with delphi extensions, the OO language i used was java. And i'm teaching the very basics of programming so, i never used slice array and other schema discriminant before, it's possible i missed a lot of thing... Just explain me (or point me to a relatively short tutorial), i only ask to learn :)
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
I wrote:
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.
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.)
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).
I've found some more missing cases:
- `Return' (where the result type is a subrange and the `Return' value is out of range)
- `Pack', `Unpack' (the index parameter)
- `Include', `Exclude'
- `Inc', `Dec'
- 4th parameter of `BlockRead', `BlockWrite' (not obvious, but GPC allows a subrange here which may be too small for the actual result)
- `Val' (2nd and 3rd parameter)
- `and', `or', `xor', `shl', `shr' used as procedures, e.g., if a is of type 1 .. 10: a := 5; or (a, 8) (whereas normal use as operators will be covered by assignments or whatever is done with them)
- Conformant arrays (i.e., where the index type in the conformant array in the formal parameter list is a subrange, and the actual parameter's range is too big -- check both bounds)
- `New' with variant records (where the variant tag is of subrange type)
- sets (e.g., assigning a set of a larger range to one of a smaller range where the former contains out of range elements)
Frank
Hi, When Frank asked me if i could do the remaining test, i was a little bit optimistic. I thought i could do that before my "computer&mail-less" holidays. And it appears that i won't. Next time i'll have time for that, it'll be mid or end Augustus. If somebody want to make those remaining tests before, that would make it implemented faster i suppose. If nobody can, i'll do that before my students come back, so it would be done for (hopefully) mid september. Except the one on ASM... sorry, 1 day won't be enough :-)
Given the mailing-list archives are not available for now, i give what's remaining to do juste here after.
Francois Schoubben wrote:
When Frank asked me if i could do the remaining test, i was a little bit optimistic. I thought i could do that before my "computer&mail-less" holidays. And it appears that i won't. Next time i'll have time for that, it'll be mid or end Augustus. If somebody want to make those remaining tests before, that would make it implemented faster i suppose. If nobody can, i'll do that before my students come back, so it would be done for (hopefully) mid september. Except the one on ASM... sorry, 1 day won't be enough :-)
Okay. I hope it shouldn't be a problem. So many people have asked for range-checking, so I suppose one of them would like to write the remaining tests.
BTW, I've prepared things in the compiler for implementing range-checking, so the next release will contain range-checking if I get the tests in say 1-2 weeks. (I don't want to delay the release for too long.)
Given the mailing-list archives are not available for now, i give what's remaining to do juste here after.
The archives are working again. Anyway, thanks for the summary.
I'm putting your test programs (with minor modifications/additions) in http://gnu-pascal.de/contrib/frank/fsc.tar.gz
Frank
On Thu, 10 Jul 2003, Frank Heckenbach wrote:
Okay. I hope it shouldn't be a problem. So many people have asked for range-checking, so I suppose one of them would like to write the remaining tests.
http://www.alu.hr/~mtodorov/pascal/rng.tar.gz
Mirsad Todorovac wrote:
On Thu, 10 Jul 2003, Frank Heckenbach wrote:
Okay. I hope it shouldn't be a problem. So many people have asked for range-checking, so I suppose one of them would like to write the remaining tests.
http://www.alu.hr/~mtodorov/pascal/rng.tar.gz
Thanks, these test are alright. Does this mean you're going to write the other missing tests?
(BTW, about the naming: Your previous tests in the test suite were called `mirsad*', some new ones you sent me `mtm*', and these ones are called `mir*' and have a `program fsc37' heading. That's not directly forbidden according to the test suite conventions, but perhaps a little confusing. ;-) Which name should we use?)
Frank
On Sat, 12 Jul 2003, Frank Heckenbach wrote:
Mirsad Todorovac wrote:
On Thu, 10 Jul 2003, Frank Heckenbach wrote:
Okay. I hope it shouldn't be a problem. So many people have asked for range-checking, so I suppose one of them would like to write the remaining tests.
http://www.alu.hr/~mtodorov/pascal/rng.tar.gz
Thanks, these test are alright. Does this mean you're going to write the other missing tests?
I think I've said I believe strength comes through diversity (*), so I don't mind if others think of something I won't of course ...
(BTW, about the naming: Your previous tests in the test suite were called `mirsad*', some new ones you sent me `mtm*', and these ones are called `mir*' and have a `program fsc37' heading. That's not directly forbidden according to the test suite conventions, but perhaps a little confusing. ;-) Which name should we use?)
Any. With mirNNNNN.pas I can have more digits and letters into 8+3 scheme. I'll fix the heading right away ... (Done).
Mirsad