opensubscriber
   Find in this group all groups
 
Unknown more information…

x : xtalks@yahoogroups.com 8 January 2005 • 6:31AM -0500

[xTalks] virtual strings (was Are arrays core?)
by Dar Scott

REPLY TO AUTHOR
 
REPLY TO GROUP






On Jan 7, 2005, at 2:37 PM, Doug Simons wrote:

> I focused on the
> fundamental principle that "any value can be viewed as a string", which
> it can be. But there are still times when it makes a difference what
> internal format a value is being stored in. I guess nothing is perfect!

I think there is a way, but it might not be worth the cost.

It might mean decimal arithmetic and doing away with numberFormat (or
using it differently).  If all precision is in the virtual number
strings then some sort of formatting function is needed, maybe one that
takes or uses numberFormat.  Where one now has 'a & (x/3)', one would
need 'a & numeralFormat(x/3)' or be content with lots of digits.

We can probably come up with some axioms of what "any value can be
viewed as a string" should mean.  One consequence should be that the
user cannot tell whether the result of arithmetic is a string or not.


> Object (property list) properties in SenseTalk can be accessed
> using several syntaxes. Here's an example from the documentation:
> put (firstName:”Joseph”, age:50) into joe
> put property age of joe -- 50
> put the age of joe -- 50
> put joeʼs firstName -- Joseph
> put joe.firstName -- Joseph
>
> Since properties are containers, you can also change their value using
> the same syntaxes:
> add 1 to joe's age
> set the lastName of joe to "Peabody"

Cool.

Some folks designs might end up with weird, but acceptable, statements
like this:

    put the joe of ages

With nesting, that is less of a problem.  There is little need to do
that kind of thing.

    put the age of joe of clients

Can you do one of these?

     put "x" into char 3 of item 2 of the friends of joe
     set char 3 of item 2 of the friends of joe to "x"

Dar

**********************************************
     DSC (Dar Scott Consulting & Dar's Lab)
     http://www.swcp.com/dsc/
     Programming Services and Software
**********************************************



To unsubscribe, send e-mail to xTalks-unsubscribe@yaho...
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xTalks/

<*> To unsubscribe from this group, send an email to:
    xTalks-unsubscribe@yaho...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.