Hi Eric,
nice going. I should have read your first email a little more thoroughly, I
guess. So I'll be a little more thorough with your second email instead,
and take my time responding.
1. According to what you say, my type designator is a word whose value is
of type datatype!.
2. When a function is created the type designator (i.e. word) is replaced
by its value, which in turn has the type datatype!.
It just so happens that the word integer! looks exactly the same as the
value integer!
Therefore, whenever I intend to interactively enter the value integer! I
end up entering the word integer!. I can only manipulate the value integer!
programmatically, for instance
>> insert a: [] type? 3
>> a
== [integer!]
>> type? first a
== datatype!
in contrast to
>> b: [integer!]
== [integer!]
>> type? first b
== word!
If I now say:
>> insert second spec-a: [ x [] ] first a
>> insert second spec-b: [ x [] ] first b
>> spec-a
== [x [integer!]]
>> spec-b
== [x [integer!]]
and then say
>> f-a: func spec-a [print x]
>> f-b: func spec-b [print x]
then I get:
>> source f-a
f-a: func [x [datatype!]][print x]
>> source f-b
f-b: func [x [integer!]][print x]
Of course I can also say:
>> f: func [x [string!]] [ print x]
>> f 3
3
>> f "abc"
** Script Error: f expected x argument of type: integer.
** Where: f "abc"
which may appear a little weird, until you see that I first modified
string! (IMHO this would have been more of a puzzle)
>> string!: type? 3
>> source f
f: func [x [integer!]][print x]
Now I'm goint to take a little time to think about your message and see
whether I come up with anything worth mentioning.
;- Elan >> [: - )]