coercion to string values has effects

Matt Neuburg matt at tidbits.com
Sat Mar 23 09:17:28 PST 2002


On Mon, 11 Mar 2002 15:30:17 +0100, Helmut =?iso-8859-1?Q?J=E4cklein?=
<hjaecklein at vogel-druck.de> said:

>thinking about the last mails, i remembered my problem
>that i have with coercion from records to strings.
>The values in the record are translated to the name
>of any global variable which has the same value.
>I know, that's usually correct,
>but is there a way to switch off this feature?

See p. 328 of my book to understand the reason for this feature. Coercion
of string4s to strings takes place in a context of name-substitution, so
that when you're examining an Apple event you see the name of a string4
constant:

  with system.macintosh.constants {msg(displaystring('afte'))}

To avoid this feature, either avoid actions where displaystring is
(implicitly) invoked, or don't use string4s, or change the context (that
is, have the string4 and the coercion take place in two different contexts
so the coercion can't see the string4). m.
-- 

matt neuburg, phd = matt at tidbits.com, http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/




More information about the Frontier-Users mailing list