Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » Functions

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

result

the result  
Values returned:

• the value set by a return keyword during the execution of a message

empty if most commands succeed; otherwise, a message string

In handlers, it’s usually best to test a command with an expression such as
if the result is not empty then ...
That way, the handler doesn’t rely on the specific value of a string.

Click Related Topics for more information about the value returned by the result for each command.


Examples

go card "ZZ" 
if the result is not empty then ... -- didn't go there

find "XZZ" in field "Title"
if the result is not empty then ... -- didn't find it

Demo Script

on resultDemo
  find "Pat, Jim, Eric, and Eli" in bkgnd field "title"
  answer "Pat, Jim, Eric, Eli:" && the result
  go to card "Pat, Jim, Eric, and Eli"
  answer "Pat, Jim, Eric, and Eli:" && the result
end resultDemo

Related Topics

« random | HyperTalk Reference | round »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View