Special Char Suggestions?

Dar Scott dsc at swcp.com
Wed May 7 17:56:01 EDT 2003


On Wednesday, May 7, 2003, at 11:07 AM, Rob Cozens wrote:

> I need to select a single character to be used as a database field 
> reference identifier in the Script Editor.
...
> My three primary candidates are:
>
>                        "{" : type{name
>
>                        "}" : type}name
>
>                        "|" : type|name
...
> Thoughts or comments, anyone?

I think ?: notation as found in C would be OK for a functional "if" 
should we eventually get that in the language, so perhaps those should 
be avoided.

I have used colons and question marks in names.

I found notes of mine that indicate that under some circumstances these 
eight characters can be in names:
`@$_:'.?

But I don't trust that and it may not be applicable.

I had suggested one time that "{x}" be shorthand notation for "(x & 
lineFeed)", but the response was underwhelming and that may be a waste 
of a perfectly good bracketing notation.

In any case, braces can be used in bracketing in some future notation, 
so I would encourage you to avoid those, since your need seems to be 
infix.

You might consider doubling the character or using two or three 
characters in general.  Perhaps they may have some semantic look or 
connotation.

Of your mentioned candidates, I like "|" the best, but ":{`)" has a 
certain appeal.

(Some commands allow special syntax for quoted strings that have quote 
marks, so your preprocessor should handle those specially.)

Is this really needed?  Would using this function be too wordy?

function xxxxx recordType, dataName
    return "item [ ordinal of " & dataName & " in dictionary] of " & 
recordType
end  xxxxx -- whatever the name should be

Dar







More information about the use-livecode mailing list