1. Bug report!

Bug report!
~~~~~~~~~

When checking a type, where the only argument is declared as integer, a type
check error occurs when I try to pass a sequence.

Example:

type pos_int (integer x)
    return x >= 0
end type

? pos_int (34.3)
? pos_int (4)
? pos_int ("Ralf")

When I check a type, I do NOT want an error to occur, rather it should
return false.
My program never claims that the argument was correct, it wanted to found
out, and handle, which is impossible since it will stop my program.

A solution would be:

type pos_int (object x)
    if integer(x) then
        return x >= 0
    else
        return 0
    end if
end type

It will work, but why do we have the choice to declare the type of argument
of our own custom types, when any BUILT-IN illegal type will result in an
ex.err dump, and any non-BUILT-IN illegal type will result false as it
should.

Robert, please change this...

Ralf

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu