dandandandan wrote: ↑Wed May 07, 2025 7:13 pm
The clones have matched HyperCard's behavior. Chunk expressions and other "the function of" forms operate on the next factor, not a full expression.
Dan
I was not entirely clear on what you were saying here. In my opinion a compound chunk expression, like the examples, the interpreter should combine all of the chunk expression and
then treat the result as the single factor.
But to test this assertion I ran HyperCard 2.4 in MiniVMac (in a web browser port of it)
put item 2 of line two of "hell,o" & return & "wor,ld"
Result: (empty)
put item 2 of line 2 of "hell,o" & return & "wor,ld" -- no ordinal 'two' keyword used
Result: (also empty)
However when I force it to do the compound first, Please Excuse My Dear Aunt Sally style:
put item 2 of ( line 2 of "hell,o" & return & "wor,ld" )
Result:
ld (correct)
Which also works fine in HC Simulator, so that is accurate to HyperTalk (well done!).
It's been two decades since I really tried to use HyperTalk for anything so I may have forgotten that the parens were required to compound a chunk like that. I still sometimes use parens anyway, just to help myself interpret when reading back a script later.
LCS dialect xT is actually a lot more forgiving it seems (not to mention includes much more syntax and more advanced features), at least in some ways. The caveat is that you can not override a language property or keyword like the 'play' command with a custom user-script in the message path, the script will not compile, most language syntax words are reserved. HyperTalk (and at least one other: OpenXION) did allow user scripts to override keywords (which I suppose could get crazy if that's not used sparingly).
In my limited spare time, I've been building up a 'SimScript' (and actual mods to the rest of the source) that add some of the LCS xT syntax to HC Sim:
I pasted a bunch of it here, if anyone is interested (do whatever you want with it licensed

) :
viewtopic.php?p=14876&sid=544c042d4e092 ... e72#p14876
I'm currenty trying to bypass HC sim's need for the stack json to come from a URL or localStorage, I want to use fileReader API to load a json 'stack' from local file into the simulator. I added an "Export JSON Stack..." easy enough, but I'm having trouble loading the exported json file back into the simulator, it seems I can't just pass in the json as text, but I can't seem to get JSON.parse( jsontext) to format it back into JS array /object either.