On Feb 18, 2009, at 5:06 AM, John Weinshel wrote:
I also always thought that the functions were overloaded; you feed
them text and they return data type based either on context, or, in
the case of field references, the fields’ data type.
Mikhail, do you think there are similar tags for script variables?
John,
Yes, I think variables are aware of what kind of data they keep; same
as fields. (BTW, variable can even keep different types in different
repetitions.)
I'm not sure what is the best way to describe this; it's probably
subjective. For myself I think about the mechanics as if every piece
of data had a tag on it saying what kind of data it is. All data
initially comes as text and gets stored as text, so when you change
field type nothing gets lost (almost; there are minor quirks, I
believe). But as soon as data lands in a field, it gets a tag. Every
formula, custom function or variable works with tagged values. Plug-
ins too, as far as I can get from their API.
Even script parameters (which display a hint that they are expected
to be text values), actually receive tagged values. E.g. one can pass
a container to a script and the script will be able to use the
container value just fine.
Kind regards,
--
Mikhail Edoshin
[email protected]