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.

param

the param of posInteger
Value returned: the value (as opposed to the name) of a parameter variable in the current handler, or empty if the parameter variable doesn't exist

The param of 0 is the name of the message itself.


Examples

param of 1
param(1)

put param(0) into theMessageName

Demo Script

on paramDemo
   showParams 1, "a", "this is fun", the number of cards
end paramDemo
on showParams
   repeat with N = 0 to the paramCount
     put N & ":" && space && param(N) & return after theMessage
   end repeat
   answer "The parameters are:" & return & return & theMessage
end showParams

Placeholders

posInteger
An expression that evaluates to a positive integer.

For example:
3
67 mod 13
the number of bg fields
the number of backgrounds
the number of cards div 2
See also: background, bkgnd, button, card, chunk, field, menu, and menuItem

Related Topics

« optionKey | HyperTalk Reference | paramCount »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View

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.

param

the param of posInteger
Value returned: the value (as opposed to the name) of a parameter variable in the current handler, or empty if the parameter variable doesn't exist

The param of 0 is the name of the message itself.


Examples

param of 1
param(1)

put param(0) into theMessageName

Demo Script

on paramDemo
   showParams 1, "a", "this is fun", the number of cards
end paramDemo
on showParams
   repeat with N = 0 to the paramCount
     put N & ":" && space && param(N) & return after theMessage
   end repeat
   answer "The parameters are:" & return & return & theMessage
end showParams

Placeholders

posInteger
An expression that evaluates to a positive integer.

For example:
3
67 mod 13
the number of bg fields
the number of backgrounds
the number of cards div 2
See also: background, bkgnd, button, card, chunk, field, menu, and menuItem

Related Topics

« optionKey | HyperTalk Reference | paramCount »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View