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.

exp, exp1, exp2

the exp of number 
the exp1 of number 
the exp2 of number
Values returned:
exp returns a number equal to the constant e raised to the power of number.
exp1 returns a number equal to 1 less than e raised to the power of number.

exp2 returns a number equal to 2 raised to the power of number.

Note: e 2.7182818


Examples

the exp of 1 --returns 2.718282
exp(1)

exp1 of 1 --returns 1.718282
exp1(1)

exp2 of 10 -- returns 1024

exp2 of 5 * 2 -- returns 64
exp2 of (5 * 2)  -- returns 1024

Placeholders

number
An expression that evaluates to a number.

For example:

169 / 19
pi
(60.625 * 500)
average(1,4,5,10)
i+1 -- (where i is a number)
line 1 of fld "Debits"


Note: Formally, HyperCard distinguishes between factors (simple values) and expressions. The difference between factors and expression matters only if you like to drop parentheses. Most functions take factors as their parameters, which is why abs of -10 + 2 returns 12 and abs of (-10 + 2) returns 8. In short, always use parentheses to group things the way you want them to evaluate, and you won’t have to worry about the difference between factors and expressions.

Related Topics

« diskSpace | HyperTalk Reference | foundChunk »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View