Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
HyperTalk
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Lists and other collections=== HyperTalk used the same chunking system to produce structures like arrays or lists. Such a structure would be created by placing multiple data items in a variable, separated by commas. Various types of data could be imported into a HyperTalk script using strings that would get parsed as required. For instance, the position of objects on the screen was defined by a pair of numbers representing the X and Y coordinates relative to the upper left corner. The following code creates a variable called ''pos'' that holds a coordinate pair, and then manipulates this to re-position all of the buttons on a card in a diagonal from top-left to bottom-right:<!-- is this really what the code does? I don't see what causes the "diagonal" aspect --> <syntaxhighlight lang="applescript"> on mouseUp put "100,100" into pos repeat with x = 1 to the number of card buttons set the location of card button x to pos add 15 to item 1 of pos end repeat end mouseUp </syntaxhighlight> The <code>item</code> chunking expression was originally based on a comma [[delimiter]], but later versions of HyperCard changed this to the value of <code>itemDelimiter</code>, offering the ability to parse arbitrary lists and structures.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)