Steven D'Aprano wrote:

> The value of a string being the same string pretty much defeats the
> purpose of having a value function. Why do you need a function that does
> nothing?

I use this capability in HyperCard to quickly extract data from within
quoted strings in database exports. I usually don't want quoted literals
to be evaluated. If the quoted string contains commas or other item
delimiters, then it isn't always possible to use the "replace" function
to strip off the commas without screwing up the number of items in the
data. The "value" function, on the other hand, works very well for this
(or it does in HyperCard anyway.)

Suppose one record of my exported data looks like this:

    "Jacque","Gay","President, HyperActive Software"

In HyperCard, the value of the last item of the line above is equal to
its string literal, i.e., "President, HyperActive Software". In MC, I
get a fairly random string returned.

> Then what is value("1+1")? Should it be the string "1+1"? Or the
> expected result of 2?

I'd say if it were in quotes, it should be treated as a string literal
and the value should be "1+1". If it isn't in quotes, the value should
be 2.

-- 
Jacqueline Landman Gay        |             [EMAIL PROTECTED]
HyperActive Software          |                   [EMAIL PROTECTED]
Custom hypermedia solutions   |         http://www.hyperactivesw.com
612.724.1596                  |                   612.724.1562 - fax


Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to