Re: type checking ?
Bernie Ryan wrote:
>
> Suppose you have a function/procedure and one of its
> parameters is a sequence.
>
> How can you type check the parameter to be a CONSTANT SEQUENCE NAME.
Could you elaborate on what you mean by "CONSTANT SEQUENCE NAME?" This
sounds like you want the parameter to be a specific value. If this is
accurate, then I can't see the utility of this, but here's an example:
with type_check
type my_constant_sequence_name( object m )
return equal( m, "My Constant Sequence Name" )
end type
procedure foo( my_constant_sequence_name bar )
-- ...
end procedure
foo("My Constant Sequence Name") -- works
foo("Ha Ha!") -- fails
Matt
|
Not Categorized, Please Help
|
|