Range Checking next tests... + questions

Frank Heckenbach frank at g-n-u.de
Wed Mar 5 02:44:33 CET 2003


Francois Schoubben wrote:

> I'd like to ask some question now...
> 
> Does packed array need separate tests?

Better yes.

> Does array in records need separate tests?

Probably not (but can't hurt to have one).

> Is setlength, concat, move, ... a kind of range check? (i don't think
> so)

Concat, Move, no. SetLength could be considered a case for
range-checking (conceptually, if we imagine the implicit `Length'
field of a string to be of type `0 .. Capacity' rather than
`Integer'); I tend to do so.

> Is tests for "while true do i:=i+1" a kind of range check? (i don't
> think so)

Well, if i is declared as, say `var i: 1 .. 10 value 1', then indeed
this loop should cause a range error the 10th time. But it's the
same error as just `i := 10; i := i + 1', so the loop is irrelevant.

> What does Frank meen by "'for' loop bounds ?
> Where can i find documentation for what's not in the manual? For exemple

For those that come from EP, BP etc., in the respective standard or
documentation ...

> frameAdress?
> index?
> insert?
> name?
> only?
> operator?
> qualified?
> readstr?
> result?
> trim?
> (maybe one or another is obvious and i missed it because of too
> obviousness :) )

None of these should require range checking, except `ReadStr' (read
from a string like `Read' does from a text file) when reading an
integer subrange.

> If you give me a definition with as much as possible (Synopsis,
> Description, conforming to _example_ See also if possible), i'll put it
> in the manual format... It may help others...

`Conforming to' for all built-ins will be in the manual in the next
version.

For the rest, I don't have the time, sorry. Unfortunately, writing
the stuff (in particular the examples, and a good description) is
what takes most time, not converting it to Texinfo ...

Frank

-- 
Frank Heckenbach, frank at g-n-u.de, http://fjf.gnu.de/, 7977168E
GPC To-Do list, latest features, fixed bugs:
http://www.gnu-pascal.de/todo.html
GPC download signing key: 51FF C1F0 1A77 C6C2 4482  4DDC 117A 9773 7F88 1707




More information about the Gpc mailing list