sort container parameters
ambassador at fourthworld.com
Wed Mar 3 13:00:37 EST 2021
Paul Dupuis wrote:
> I just discovered much to my dismay that you can not execute the
> put "ascending" into tDirection
> soft lines of tContainer tDirection international
> apparently neither the sort direction (ascending|descending) nor the
> sort type (international|text|datetime|numeric|binary) can be
> I see this a a bug or perhaps a failure to fully robust impliment the
> sort container command? Does any one else see this as a bug?
Bug or feature? The ambiguities introduced by the HyperTalk team have
made that an evergreen question. ;)
Some tokens can be parameterized, others not.
MC/LC goes much further than HC in allowing object references to be a
mix of literal and variable expressions, e.g.:
-- Works in LC, not in HC:
put the long id of this cd into tCdObj
get the name of btn 1 of tCdObj
...but other expressions and keywords are not so clear.
Let's see what happens if we parameterize everything in your statement:
put "ascending" into tDirection
put "numeric" into tSortType
put "items" into tChunkType
put "1,2,3,4,5,6,7,8,9" into tData
sort tChunkType of tData tSortType tDirection
In that last line, which variables should we expect to be allowed, and
which ones not?
I'm certain there's a rule defining this.
I'm equally certain I've never met any xTalker who was able to intuit
that rule with complete confidence.
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode