FACTOID # 82: The women of Iceland earn two-thirds of their nation's university degrees.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RELATED ARTICLES
People who viewed "HyperTalk" also viewed:
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > HyperTalk

HyperTalk is a high-level programming language created in 1987 by Dan Winkler and used in conjunction with Apple Computer's HyperCard hypermedia program by Bill Atkinson. The main target audience of HyperTalk was beginning programmers, hence HyperTalk programmers were usually called authors, and the process of writing programs was called "scripting". HyperTalk scripts are fairly similar to written English, and use a logic structure similar to the Pascal programming language. Computer code (HTML with JavaScript) in a tool that uses Syntax highlighting (colors) to help the developer see the function of each piece of code. ... Apple Computer, Inc. ... HyperCard HyperCard is an application program and a simple programming environment produced by Apple Computer which runs natively only in Mac OS versions 9 or earlier (it can still be used in Mac OS Xs Classic mode). ... Bill Atkinson worked at Apple Computer in the late 1970s and early 1980s. ... Scripting programming languages (commonly called scripting languages or script languages) are computer programming languages designed for scripting the operation of a computer. ... The English language is a West Germanic language that originates in England. ... Pascal is an imperative computer programming language, developed in 1970 by Niklaus Wirth as a language particularly suitable for structured programming. ...


The case-insensitive language was at first interpreted, but since HyperCard 2.x 'virtually compiled'. It supports the basic control structures of procedural languages: repeat for/while/until, if/then/else, as well as function and message "handler" calls (a handler is a subroutine, a message handler is a procedure). Data types are transparent to the user, conversion happens transparently in the background between strings and numbers. There are no classes or data structures in the traditional sense; their place was taken by special strings, or rather "lists" of "items" delimited by a certain character (in later versions the "itemDelimiter" property allowed choosing an arbitrary character). A diagram of the operation of a typical multi-language compiler. ... ... In computer science, a datatype (often simply a type) is a name or label for a set of values and some operations which one can perform on that set of values. ... Generally, string is a thin piece of fiber which is used to tie, bind, or hang other objects. ... In object-oriented programming, classes are used to group related variables and functions. ... A binary tree, a simple type of branching linked data structure. ... In various branches of mathematics and computer science, strings are sequences of various simple objects (symbols, tokens, characters, etc. ...

Contents


Object-Oriented HyperTalk

However, HyperTalk was by no means a strictly procedural language. Scripts were associated with objects in HyperCard files (so-called "stacks"), and HyperTalk allowed manipulating these objects in various ways, changing their properties using the "set" command, for example. Objects were addressed using a syntax close to natural language, where objects were specified relative to the current card, or the of operator was used to specify the absolute position of an object: send "mouseUp" to card button "OK" of card "Veracity". Since buttons could also exist on the background layer, but their content would differ between cards, there were card buttons, background buttons etc. Objects could be addressed by their name, z-ordering number, or by a unique ID number that usually did not change throughout an object's lifetime. To iterate over objects (joinedly referred to as parts in HyperCard 2.2 and later), one simply used their number after querying e.g. the number of card parts. HyperCard HyperCard is an application program and a simple programming environment produced by Apple Computer which runs natively only in Mac OS versions 9 or earlier (it can still be used in Mac OS Xs Classic mode). ... Z-order is an ordering of overlapping two-dimensional objects, such as windows in a graphical user interface (GUI) or shapes in a vector graphics editor. ...


HyperTalk also provided full-blown script control over the built-in drawing tools, simply by scripting the needed changes in paint tools and simulating mouse movements using the drag from start to end and the click at pos commands.


HyperTalk also used messages (i.e. events) sent to objects to handle user interaction. E.g. the mouseDown message was sent to a button when the user clicked it, and mouseUp was sent when the user released the mouse inside it to trigger its action. Similarly, it had the periodic idle message, mouseEnter, mouseLeave, ... and various other messages related to navigation between different cards in a HyperCard stack, as well as user input (keyDown, functionKey, ...), and system events. As far as the scripters were concerned, there were no main event loops like in other procedural programming languages.


Extending HyperTalk

Although the HyperTalk language languished just like HyperCard itself, it received a second lease on life through its plugin protocol, so-called External Commands (XCMDs) and External Functions (XFCNs), which were native code containers attached to stacks (as Macintosh-specific resources) with a single entry point and return value. XCMDs and XFCNs could be called just like regular message and function handlers from HyperTalk scripts, and were also able to send messages back to the HyperCard application. Some enterprising XCMD authors added advanced features like full color support (ColorizeHC, HyperTint, AddColor), multiple special-purpose windows (Prompt, Tabloid, Textoid, Listoid, ShowDialog, MegaWindows), drag and drop support and various hardware interfaces to the language. The resource fork is a construct of the Mac OS operating system and implemented in all of the filesystems used for system drives on the Macintosh, MFS, HFS and HFS Plus (However later versions of mac OS could read and write to disks in formats that didnt support resourse...


Descendants of HyperTalk

Various languages have taken their cues from HyperTalk. There are straight clones like

  • SuperTalk - The language of SuperCard by Bill Appleton, the first HyperCard clone. Appleton also wrote the popular WorldBuilder adventure construction kit.
  • PlusTalk (?) - of Spinnaker Plus (originally by the German Format Verlag), which was used as the basis for OMO.
  • MediaTalk - The language of Oracle Media Objects, the first cross-platform HyperCard clone, and the only one that was truly modular.
  • CompileIt!-Talk - A HyperCard stack and XCMD by Tom Pittman that allowed compiling native 68000 machine code (e.g. for XCMDs and XFCNs) from HyperTalk code, and calling the native Macintosh toolbox routines. CompileIt was bootstrapped, that is, later versions were compiled using earlier versions of itself.
  • Double-XX-Talk (?) - Double-XX was a lightweight HyperCard clone that shipped as an addition to CompileIt! and allowed running XCMDs and XFCNs without HyperCard, and even included a small HyperTalk interpreter.
  • Transcript (fka MetaTalk) - The language of the Unix-originated HyperCard clone Revolution (formerly MetaCard).
  • SenseTalk - The language of the NeXT-originated HyperSense and the VNC-based testing tool Eggplant.

As well as second-level clones like Bootstrapping alludes to a German legend about a Baron Münchhausen, who was able to lift himself out of a swamp by pulling himself up by his bootstraps. ...

  • Lingo - the programming language of Macromedia Director
  • AppleScript - the main scripting language of Apple's Mac OS.

Many method names first popularized by HyperTalk made it into later languages, such as the onmouseUp message in JavaScript. Although Asymmetrix Toolbook is often also considered a HyperCard clone, its scripting language apparently bears little resemblance to HyperTalk. Lingo is an American television game show that GSN produced along with other companies. ... AppleScript is a scripting language devised by Apple Computer, and built into Mac OS. More generally, AppleScript is the word used to designate the Mac OS scripting interface, which is meant to operate in parallel with the graphical user interface. ...


These clones and dialects (commonly referred to under the moniker of "xTalk"-languages) added various features to the language that are expected from a modern programming language, like exception handling, user-defined object properties, timers, multi-threading and even user-defined objects.


Some sample scripts

 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 
 on mouseDown put "Disk:Folder:MyFile" into filePath -- no need to declare variables if there is a file filePath then open file filePath read from file filePath until return put it into cd fld "some field" close file filePath set the textStyle of character 1 to 10 of card field "some field" to bold end if end mouseDown 
 function replaceStr pattern,newStr,inStr repeat while pattern is in inStr put offset(pattern,inStr) into pos put newStr into character pos to (pos +the length of pattern)-1 of inStr end repeat return inStr end replaceStr 

  Results from FactBites:
 
Dictionary of Programming Languages (390 words)
Because Apple envisioned the users of HyperTalk to be multimedia developers and not traditional programmers, they HyperTalk interpreter was designed to be very forgiving: it allows various syntactic sugar, type conversion is automatic, and everything is case-insensitive.
HyperTalk supports the notion of add-on 'external' functions and commands; these are roughly analogous to library modules in a language like C. HyperCard 2 compiles individual HyperTalk functions into intermediate codes the first time the function is called.
HyperTalk continues to evolve along with the HyperCard product (version 3 due soon), but it is unclear whether it is still going to be a viable language.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.