From a35a41b27aae03162dd78a9aa42785d2f7c8be4d Mon Sep 17 00:00:00 2001 From: Paul McClernan <15096916+PaulMcClernan@users.noreply.github.com> Date: Wed, 4 Dec 2024 20:50:00 -0500 Subject: [PATCH] Add files via upload --- Docs/hyp/2.2/fn/abs.html | 36 ++++ Docs/hyp/2.2/fn/annuity.html | 42 ++++ Docs/hyp/2.2/fn/atan.html | 33 +++ Docs/hyp/2.2/fn/average.html | 32 +++ Docs/hyp/2.2/fn/chartonum.html | 35 ++++ Docs/hyp/2.2/fn/compound.html | 49 +++++ Docs/hyp/2.2/fn/cos.html | 34 +++ Docs/hyp/2.2/fn/date.html | 54 +++++ Docs/hyp/2.2/fn/exp.html | 36 ++++ Docs/hyp/2.2/fn/exp1.html | 36 ++++ Docs/hyp/2.2/fn/exp2.html | 36 ++++ Docs/hyp/2.2/fn/heapspace.html | 32 +++ Docs/hyp/2.2/fn/index.html | 59 ++++++ Docs/hyp/2.2/fn/length.html | 33 +++ Docs/hyp/2.2/fn/ln.html | 35 ++++ Docs/hyp/2.2/fn/ln1.html | 37 ++++ Docs/hyp/2.2/fn/log2.html | 35 ++++ Docs/hyp/2.2/fn/max.html | 27 +++ Docs/hyp/2.2/fn/min.html | 27 +++ Docs/hyp/2.2/fn/number.html | 41 ++++ Docs/hyp/2.2/fn/numtochar.html | 35 ++++ Docs/hyp/2.2/fn/offset.html | 30 +++ Docs/hyp/2.2/fn/param.html | 45 ++++ Docs/hyp/2.2/fn/paramcount.html | 44 ++++ Docs/hyp/2.2/fn/params.html | 37 ++++ Docs/hyp/2.2/fn/random.html | 43 ++++ Docs/hyp/2.2/fn/result.html | 32 +++ Docs/hyp/2.2/fn/round.html | 320 +++++++++++++++++++++++++++++ Docs/hyp/2.2/fn/seconds.html | 34 +++ Docs/hyp/2.2/fn/secs.html | 34 +++ Docs/hyp/2.2/fn/serialports.html | 35 ++++ Docs/hyp/2.2/fn/sin.html | 34 +++ Docs/hyp/2.2/fn/sound.html | 36 ++++ Docs/hyp/2.2/fn/speech.html | 36 ++++ Docs/hyp/2.2/fn/sqrt.html | 33 +++ Docs/hyp/2.2/fn/sum.html | 36 ++++ Docs/hyp/2.2/fn/systemversion.html | 35 ++++ Docs/hyp/2.2/fn/tan.html | 34 +++ Docs/hyp/2.2/fn/ticks.html | 34 +++ Docs/hyp/2.2/fn/time.html | 50 +++++ Docs/hyp/2.2/fn/trunc.html | 318 ++++++++++++++++++++++++++++ Docs/hyp/2.2/fn/value.html | 45 ++++ Docs/hyp/2.2/fn/version.html | 29 +++ Docs/hyp/2.2/fn/voices.html | 31 +++ 44 files changed, 2189 insertions(+) create mode 100644 Docs/hyp/2.2/fn/abs.html create mode 100644 Docs/hyp/2.2/fn/annuity.html create mode 100644 Docs/hyp/2.2/fn/atan.html create mode 100644 Docs/hyp/2.2/fn/average.html create mode 100644 Docs/hyp/2.2/fn/chartonum.html create mode 100644 Docs/hyp/2.2/fn/compound.html create mode 100644 Docs/hyp/2.2/fn/cos.html create mode 100644 Docs/hyp/2.2/fn/date.html create mode 100644 Docs/hyp/2.2/fn/exp.html create mode 100644 Docs/hyp/2.2/fn/exp1.html create mode 100644 Docs/hyp/2.2/fn/exp2.html create mode 100644 Docs/hyp/2.2/fn/heapspace.html create mode 100644 Docs/hyp/2.2/fn/index.html create mode 100644 Docs/hyp/2.2/fn/length.html create mode 100644 Docs/hyp/2.2/fn/ln.html create mode 100644 Docs/hyp/2.2/fn/ln1.html create mode 100644 Docs/hyp/2.2/fn/log2.html create mode 100644 Docs/hyp/2.2/fn/max.html create mode 100644 Docs/hyp/2.2/fn/min.html create mode 100644 Docs/hyp/2.2/fn/number.html create mode 100644 Docs/hyp/2.2/fn/numtochar.html create mode 100644 Docs/hyp/2.2/fn/offset.html create mode 100644 Docs/hyp/2.2/fn/param.html create mode 100644 Docs/hyp/2.2/fn/paramcount.html create mode 100644 Docs/hyp/2.2/fn/params.html create mode 100644 Docs/hyp/2.2/fn/random.html create mode 100644 Docs/hyp/2.2/fn/result.html create mode 100644 Docs/hyp/2.2/fn/round.html create mode 100644 Docs/hyp/2.2/fn/seconds.html create mode 100644 Docs/hyp/2.2/fn/secs.html create mode 100644 Docs/hyp/2.2/fn/serialports.html create mode 100644 Docs/hyp/2.2/fn/sin.html create mode 100644 Docs/hyp/2.2/fn/sound.html create mode 100644 Docs/hyp/2.2/fn/speech.html create mode 100644 Docs/hyp/2.2/fn/sqrt.html create mode 100644 Docs/hyp/2.2/fn/sum.html create mode 100644 Docs/hyp/2.2/fn/systemversion.html create mode 100644 Docs/hyp/2.2/fn/tan.html create mode 100644 Docs/hyp/2.2/fn/ticks.html create mode 100644 Docs/hyp/2.2/fn/time.html create mode 100644 Docs/hyp/2.2/fn/trunc.html create mode 100644 Docs/hyp/2.2/fn/value.html create mode 100644 Docs/hyp/2.2/fn/version.html create mode 100644 Docs/hyp/2.2/fn/voices.html diff --git a/Docs/hyp/2.2/fn/abs.html b/Docs/hyp/2.2/fn/abs.html new file mode 100644 index 00000000..4612ded0 --- /dev/null +++ b/Docs/hyp/2.2/fn/abs.html @@ -0,0 +1,36 @@ + + +HyperTalk 2.2 Functions - abs + + + + + + + +

Functions

+

abs

+

Supported By

+ +

Syntax

+

[the] abs of factor

+

abs ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+
+put abs(a-b) into theDifference
+
+

Description

+

The abs function returns the absolute value of its argument.

+

If the argument is an integer, an integer is returned.

+

If the argument is a number, a number is returned.

+

If the argument is a complex, a complex is returned. The returned complex will have a real part of the distance of the passed in complex from the origin, and an imaginary part of zero.

+

Note

+

This function is similar to the hypot and radius functions, but takes one numeric argument rather than a list.

+ + diff --git a/Docs/hyp/2.2/fn/annuity.html b/Docs/hyp/2.2/fn/annuity.html new file mode 100644 index 00000000..bdd71008 --- /dev/null +++ b/Docs/hyp/2.2/fn/annuity.html @@ -0,0 +1,42 @@ + + +HyperTalk 2.2 Functions - annuity + + + + + + + +

Functions

+

annuity

+

Supported By

+ +

Syntax

+

[the] annuity of ( rate , periods )

+

annuity ( rate , periods )

+

Rate and periods yield integers, numbers, or complexes.

+

Examples

+
+put myPayment*annuity(.015,12) into presentValue
+
+
+put myPayment*annuity(.015,12)*compound(.015,12) ¬
+    into futureValue
+
+

Description

+

The annuity function is used to calculate the present or future value of an ordinary annuity. Rate is the interest rate per period, and periods is the number of periods over which the value is calculated.

+

The formula for the annuity function is:

+

annuity(rate, periods) = (1-((1+rate)^(-periods)))/rate

+

The annuity function is faster and more accurate than using the above formula.

+

Note

+

You can use complex arguments to this function, but what this means exactly is up to the accountants and economists to figure out, not me.

+

See Also

+

compound

+ + diff --git a/Docs/hyp/2.2/fn/atan.html b/Docs/hyp/2.2/fn/atan.html new file mode 100644 index 00000000..fe10087e --- /dev/null +++ b/Docs/hyp/2.2/fn/atan.html @@ -0,0 +1,33 @@ + + +HyperTalk 2.2 Functions - atan + + + + + + + +

Functions

+

atan

+

Supported By

+ +

Syntax

+

[the] atan of factor

+

atan ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+
+put atan(theTangent) into theAngle
+
+

Description

+

The atan function returns the inverse tangent of its argument.

+

If the argument is an integer or a number, a number is returned.

+

If the argument is a complex, a complex is returned.

+ + diff --git a/Docs/hyp/2.2/fn/average.html b/Docs/hyp/2.2/fn/average.html new file mode 100644 index 00000000..74d9fc67 --- /dev/null +++ b/Docs/hyp/2.2/fn/average.html @@ -0,0 +1,32 @@ + + +HyperTalk 2.2 Functions - average + + + + + + + +

Functions

+

average

+

Supported By

+ +

Syntax

+

[the] average of factor

+

average ( expression )

+

Factor and expression yield lists of integers, numbers, or complexes.

+

Example

+
+put average(1,3,4) into bill
+
+

Description

+

The average function returns the arithmetic mean, or average, of the numeric values passed to it. This is equal to the sum of the passed values divided by the number of values.

+

If all the values are integers or numbers, a number is returned. If any value is a complex, a complex is returned.

+ + diff --git a/Docs/hyp/2.2/fn/chartonum.html b/Docs/hyp/2.2/fn/chartonum.html new file mode 100644 index 00000000..49ea6348 --- /dev/null +++ b/Docs/hyp/2.2/fn/chartonum.html @@ -0,0 +1,35 @@ + + +HyperTalk 2.2 Functions - charToNum + + + + + + + +

Functions

+

charToNum

+

Supported By

+ +

Syntax

+

[the] charToNum of factor

+

charToNum ( expression )

+

Factor and expression yield a character.

+

Example

+
+put the charToNum of "a" into it -- yields 97
+
+

Description

+

The charToNum function returns the equivalent value of the character passed to it in the text encoding specified by the textEncoding property.

+

Note

+

If more than one character is passed, charToNum returns the value of the first character.

+

See Also

+

numToChar

+ + diff --git a/Docs/hyp/2.2/fn/compound.html b/Docs/hyp/2.2/fn/compound.html new file mode 100644 index 00000000..db894062 --- /dev/null +++ b/Docs/hyp/2.2/fn/compound.html @@ -0,0 +1,49 @@ + + +HyperTalk 2.2 Functions - compound + + + + + + + +

Functions

+

compound

+

Supported By

+ +

Syntax

+

[the] compound of ( rate , periods )

+

compound ( rate , periods )

+

Rate and periods yield integers, numbers, or complexes.

+

Examples

+
+put futureValue/compound(.10,12) into presentValue
+
+
+put presentValue*compound(.10,12) into futureValue
+
+

Description

+

The compound function is used to calculate the present or future value of a compound interest-bearing account. Rate is the interest rate per period, and periods is the number of periods over which the value is calculated.

+

The formula for the compound function is:

+

compound(rate, periods) = (1+rate)^periods.

+

The compound function is faster and more accurate than using the above formula.

+

Script

+

The following example calculates the value in one year of an account earning 7.5 percent interest compounded monthly:

+
+on calcInterest
+  ask "Enter the beginning balance:" with empty
+  put "Value in 1 year $" & it * compound(.075/12, 12)
+end calcInterest
+
+

Note

+

You can use complex arguments to this function, but what this means exactly is up to the accountants and economists to figure out, not me.

+

See Also

+

annuity

+ + diff --git a/Docs/hyp/2.2/fn/cos.html b/Docs/hyp/2.2/fn/cos.html new file mode 100644 index 00000000..a6261d19 --- /dev/null +++ b/Docs/hyp/2.2/fn/cos.html @@ -0,0 +1,34 @@ + + +HyperTalk 2.2 Functions - cos + + + + + + + +

Functions

+

cos

+

Supported By

+ +

Syntax

+

[the] cos of factor

+

cos ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+
+put the cos of 2 -- yields -0.416147
+
+

Description

+

The cos function returns the cosine of the angle that is passed to it. The angle must be expressed in radians.

+

If the argument is an integer or a number, a number is returned. If the argument is a complex, a complex is returned.

+

Note

+

Radians can be converted to degrees with the toDegrees function, or by multiplying by 180 and dividing by pi. Degrees can be converted to radians with the toRadians function, or by multiplying by pi and dividing by 180.

+ + diff --git a/Docs/hyp/2.2/fn/date.html b/Docs/hyp/2.2/fn/date.html new file mode 100644 index 00000000..81d73752 --- /dev/null +++ b/Docs/hyp/2.2/fn/date.html @@ -0,0 +1,54 @@ + + +HyperTalk 2.2 Functions - date + + + + + + + +

Functions

+

date

+

Supported By

+ +

Syntax

+

the [modifier] date

+

date ()

+

Modifier is short, abbreviated, long, or English. The default is short.

+

Example

+
+put the last word of the long date into currentYear
+
+

Description

+

The date function returns a date representing the current date. There are four forms of the date function:

+ + + + + + + + + + + + + + + + + +
the short date20/7/93
the abbrev dateTue 20 Oct 1992
the long dateTuesday 7 October 1989
the English dateSaturday, February 15, 1986
+

Notes

+

The format of the date is dependent on the current locale. This is important if you want to write scripts that work anywhere without modification. You cannot assume that the date function will always return a date in the same format.

+

To prevent issues caused by differing local date formats, use the seconds or the dateItems to store and perform calculations with dates and times.

+

See Also

+

convert, seconds, ticks, time

+ + diff --git a/Docs/hyp/2.2/fn/exp.html b/Docs/hyp/2.2/fn/exp.html new file mode 100644 index 00000000..9b3819aa --- /dev/null +++ b/Docs/hyp/2.2/fn/exp.html @@ -0,0 +1,36 @@ + + +HyperTalk 2.2 Functions - exp + + + + + + + +

Functions

+

exp

+

Supported By

+ +

Syntax

+

[the] exp of factor

+

exp ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+
+put the exp of 2 -- yields 7.389056
+
+

Description

+

The exp function returns the mathematical exponential of its argument, defined as the constant e, which is approximately 2.7182818284, raised to the power specified by the argument. That is, it returns:

+

euler^number

+

The exp function is faster and more accurate than using the above formula.

+

If the argument is an integer or a number, a number is returned. If the argument is a complex, a complex is returned.

+

See Also

+

exp1, exp2, ln, ln1, log2

+ + diff --git a/Docs/hyp/2.2/fn/exp1.html b/Docs/hyp/2.2/fn/exp1.html new file mode 100644 index 00000000..f464a4cc --- /dev/null +++ b/Docs/hyp/2.2/fn/exp1.html @@ -0,0 +1,36 @@ + + +HyperTalk 2.2 Functions - exp1 + + + + + + + +

Functions

+

exp1

+

Supported By

+ +

Syntax

+

[the] exp1 of factor

+

exp1 ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+
+put the exp1 of 2 -- yields 6.389056
+
+

Description

+

The exp1 function returns 1 less than the mathematical exponential of its argument. That is, it returns:

+

(euler^number)-1

+

The exp1 function is faster and more accurate than using the above formula.

+

If the argument is an integer or a number, a number is returned. If the argument is a complex, a complex is returned.

+

See Also

+

exp, exp2, ln, ln1, log2

+ + diff --git a/Docs/hyp/2.2/fn/exp2.html b/Docs/hyp/2.2/fn/exp2.html new file mode 100644 index 00000000..5273d4db --- /dev/null +++ b/Docs/hyp/2.2/fn/exp2.html @@ -0,0 +1,36 @@ + + +HyperTalk 2.2 Functions - exp2 + + + + + + + +

Functions

+

exp2

+

Supported By

+ +

Syntax

+

[the] exp2 of factor

+

exp2 ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+
+put the exp2 of 16 -- yields 65536
+
+

Description

+

The exp2 function returns the value of 2 raised to the power specified by its argument. That is, it returns:

+

2^number

+

The exp2 function is faster and more accurate than using the above formula.

+

If the argument is an integer or a number, a number is returned. If the argument is a complex, a complex is returned.

+

See Also

+

exp, exp1, ln, ln1, log2

+ + diff --git a/Docs/hyp/2.2/fn/heapspace.html b/Docs/hyp/2.2/fn/heapspace.html new file mode 100644 index 00000000..eb0a3401 --- /dev/null +++ b/Docs/hyp/2.2/fn/heapspace.html @@ -0,0 +1,32 @@ + + +HyperTalk 2.2 Functions - heapSpace + + + + + + + +

Functions

+

heapSpace

+

Supported By

+ +

Syntax

+

the heapSpace

+

heapSpace ()

+

Example

+
+put the heapSpace into heapOFun
+
+

Description

+

In OpenXION, the heapSpace function returns the number of bytes of heap space currently available to the Java virtual machine.

+

In HyperTalk, the heapSpace function returns the number of bytes of heap space currently available to HyperCard.

+

Security

+

To use this function, OpenXION's security settings must allow the SYSTEM_INFO security key. If the required security key is denied, a script error will be triggered.

+ + diff --git a/Docs/hyp/2.2/fn/index.html b/Docs/hyp/2.2/fn/index.html new file mode 100644 index 00000000..d4958547 --- /dev/null +++ b/Docs/hyp/2.2/fn/index.html @@ -0,0 +1,59 @@ + + +HyperTalk 2.2 Functions + + + + + + + +

Functions

+

This page describes the functions supported by HyperTalk.

+ + + diff --git a/Docs/hyp/2.2/fn/length.html b/Docs/hyp/2.2/fn/length.html new file mode 100644 index 00000000..2a7b7e96 --- /dev/null +++ b/Docs/hyp/2.2/fn/length.html @@ -0,0 +1,33 @@ + + +HyperTalk 2.2 Functions - length + + + + + + + +

Functions

+

length

+

Supported By

+ +

Syntax

+

[the] length of factor

+

length ( expression )

+

Factor and expression yield strings.

+

Example

+

put length("tail") into it -- yields 4

+

put length("Nu är det slut…") -- yields 15

+

if the length of word n of steve > 25 ¬
  then add 1 to fogIndex

+

Description

+

The length function returns the number of characters (including spaces, tabs, line breaks, and other control and formatting characters) in the string passed to it.

+

Note

+

The expression length(factor) is identical in effect to the number of characters in factor but is more efficient.

+ + diff --git a/Docs/hyp/2.2/fn/ln.html b/Docs/hyp/2.2/fn/ln.html new file mode 100644 index 00000000..762c0361 --- /dev/null +++ b/Docs/hyp/2.2/fn/ln.html @@ -0,0 +1,35 @@ + + +HyperTalk 2.2 Functions - ln + + + + + + + +

Functions

+

ln

+

Supported By

+ +

Syntax

+

[the] ln of factor

+

ln ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+
+put the ln of 10 -- yields 2.302585
+
+

Description

+

The ln function returns the base-e (natural) logarithm of the number passed to it.

+

If the argument is a positive integer or number, a number is returned. If the argument is zero, negative infinity is returned. If the argument is a negative integer or number, NaN is returned. To get a complex result, convert the argument to a complex.

+

If the argument is a complex, a complex is returned.

+

See Also

+

exp, exp1, exp2, ln1, log2

+ + diff --git a/Docs/hyp/2.2/fn/ln1.html b/Docs/hyp/2.2/fn/ln1.html new file mode 100644 index 00000000..8fca4d83 --- /dev/null +++ b/Docs/hyp/2.2/fn/ln1.html @@ -0,0 +1,37 @@ + + +HyperTalk 2.2 Functions - ln1 + + + + + + + +

Functions

+

ln1

+

Supported By

+ +

Syntax

+

[the] ln1 of factor

+

ln1 ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+
+put the ln1 of 10 -- yields 2.397895
+
+

Description

+

The ln1 function returns the base-e (natural) logarithm of 1 plus the number passed to it. That is, it returns:

+

ln(1+number)

+

The ln1 function is faster and more accurate than using the above formula.

+

If the argument is an integer or a number greater than -1, a number is returned. If the argument is -1 exactly, negative infinity is returned. If the argument is an integer or a number less than -1, NaN is returned. To get a complex result, convert the argument to a complex.

+

If the argument is a complex, a complex is returned.

+

See Also

+

exp, exp1, exp2, ln, log2

+ + diff --git a/Docs/hyp/2.2/fn/log2.html b/Docs/hyp/2.2/fn/log2.html new file mode 100644 index 00000000..739fd207 --- /dev/null +++ b/Docs/hyp/2.2/fn/log2.html @@ -0,0 +1,35 @@ + + +HyperTalk 2.2 Functions - log2 + + + + + + + +

Functions

+

log2

+

Supported By

+ +

Syntax

+

[the] log2 of factor

+

log2 ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+
+put the log2 of 10 -- yields 3.321928
+
+

Description

+

The log2 function returns the base-2 (binary) logarithm of the number passed to it.

+

If the argument is a positive integer or number, a number is returned. If the argument is zero, negative infinity is returned. If the argument is a negative integer or number, NaN is returned. To get a complex result, convert the argument to a complex.

+

If the argument is a complex, a complex is returned.

+

See Also

+

exp, exp1, exp2, ln, ln1

+ + diff --git a/Docs/hyp/2.2/fn/max.html b/Docs/hyp/2.2/fn/max.html new file mode 100644 index 00000000..c52f5cfc --- /dev/null +++ b/Docs/hyp/2.2/fn/max.html @@ -0,0 +1,27 @@ + + +HyperTalk 2.2 Functions - max + + + + + + + +

Functions

+

max

+

Supported By

+ +

Syntax

+

[the] max of factor

+

max ( expression )

+

Factor and expression yield any kind of list.

+

Description

+

The max function returns the largest element of its arguments. The elements are compared as if by the > operator.

+ + diff --git a/Docs/hyp/2.2/fn/min.html b/Docs/hyp/2.2/fn/min.html new file mode 100644 index 00000000..fe85aa80 --- /dev/null +++ b/Docs/hyp/2.2/fn/min.html @@ -0,0 +1,27 @@ + + +HyperTalk 2.2 Functions - min + + + + + + + +

Functions

+

min

+

Supported By

+ +

Syntax

+

[the] min of factor

+

min ( expression )

+

Factor and expression yield any kind of list.

+

Description

+

The min function returns the smallest element of its arguments. The elements are compared as if by the < operator.

+ + diff --git a/Docs/hyp/2.2/fn/number.html b/Docs/hyp/2.2/fn/number.html new file mode 100644 index 00000000..4e547472 --- /dev/null +++ b/Docs/hyp/2.2/fn/number.html @@ -0,0 +1,41 @@ + + +HyperTalk 2.2 Functions - number + + + + + + + +

Functions

+

number

+

Supported By

+ +

Syntax

+

[the] number of factor

+

number ( expression )

+

Factor and expression yield chunk expressions, lists, or objects.

+

Examples

+
+get the number of elements in steve
+
+
+get the number of words in bill
+
+
+get the number of andy
+
+

Description

+

For chunk expressions, the number function returns the number of chunks in a range.

+

For lists, the number function returns the number of elements in a list.

+

For objects, the number function returns the index of an object.

+

See Also

+

number

+ + diff --git a/Docs/hyp/2.2/fn/numtochar.html b/Docs/hyp/2.2/fn/numtochar.html new file mode 100644 index 00000000..b9c3eeb6 --- /dev/null +++ b/Docs/hyp/2.2/fn/numtochar.html @@ -0,0 +1,35 @@ + + +HyperTalk 2.2 Functions - numToChar + + + + + + + +

Functions

+

numToChar

+

Supported By

+ +

Syntax

+

[the] numToChar of factor

+

numToChar ( expression )

+

Factor and expression yield non-negative integers.

+

Example

+
+put numToChar(67) into it -- yields C
+
+

Description

+

The numToChar function returns the character whose equivalent value in the text encoding specified by the textEncoding property is that of the integer passed to it.

+

Compatibility

+

In HyperTalk, numToChar(0) triggers a script error. In XION, numToChar(0) returns null.

+

See Also

+

charToNum

+ + diff --git a/Docs/hyp/2.2/fn/offset.html b/Docs/hyp/2.2/fn/offset.html new file mode 100644 index 00000000..e6ccf36c --- /dev/null +++ b/Docs/hyp/2.2/fn/offset.html @@ -0,0 +1,30 @@ + + +HyperTalk 2.2 Functions - offset + + + + + + + +

Functions

+

offset

+

Supported By

+ +

Syntax

+

[the] offset of ( needle , haystack )

+

offset ( needle , haystack )

+

Haystack and needle yield strings.

+

Description

+

The offset function returns the index of the first appearance of the string needle in the string haystack, starting at 1. If needle cannot be found in haystack, zero is returned.

+

This function is case-insensitive. For a case-sensitive version of this function, see csOffset. For a regular expression-based version of this function, see regOffset.

+

Note

+

This function is similar to instr, but the arguments are in reverse order.

+ + diff --git a/Docs/hyp/2.2/fn/param.html b/Docs/hyp/2.2/fn/param.html new file mode 100644 index 00000000..13041d88 --- /dev/null +++ b/Docs/hyp/2.2/fn/param.html @@ -0,0 +1,45 @@ + + +HyperTalk 2.2 Functions - param + + + + + + + +

Functions

+

param

+

Supported By

+ +

Syntax

+

[the] param of factor

+

param ( expression )

+

Factor and expression yield integers.

+

Example

+
+if param(1) is empty then answer ¬
+  "The first parameter is null."
+
+

Description

+

The param function returns a parameter value from the parameter list passed to the currently executing handler. The parameter returned is the nth parameter, where n is the integer passed to the function. The value of param(0) is the message name.

+

Script

+

The following example sums the arguments passed to it, regardless of how many there are. In other words, it is functionally equivalent to the sum function:

+
+function addUp
+  put 0 into total
+  repeat with i = 1 to the paramCount
+    add param(i) to total
+  end repeat
+  return total
+end addUp
+
+

See Also

+

paramCount, params

+ + diff --git a/Docs/hyp/2.2/fn/paramcount.html b/Docs/hyp/2.2/fn/paramcount.html new file mode 100644 index 00000000..c766254f --- /dev/null +++ b/Docs/hyp/2.2/fn/paramcount.html @@ -0,0 +1,44 @@ + + +HyperTalk 2.2 Functions - paramCount + + + + + + + +

Functions

+

paramCount

+

Supported By

+ +

Syntax

+

the paramCount

+

paramCount ()

+

Example

+
+if the paramCount < 3 then ¬
+  put "I need at least three arguments."
+
+

Description

+

The paramCount function returns the number of parameters passed to the currently executing handler.

+

Script

+

The following example multiplies the arguments passed to it, regardless of how many there are. In other words, it is functionally equivalent to the product function:

+
+function theProduct
+  put 1 into total
+  repeat with i = 1 to the paramCount
+    multiply total by param(i)
+  end repeat
+  return total
+end theProduct
+
+

See Also

+

param, params

+ + diff --git a/Docs/hyp/2.2/fn/params.html b/Docs/hyp/2.2/fn/params.html new file mode 100644 index 00000000..9d49b978 --- /dev/null +++ b/Docs/hyp/2.2/fn/params.html @@ -0,0 +1,37 @@ + + +HyperTalk 2.2 Functions - params + + + + + + + +

Functions

+

params

+

Supported By

+ +

Syntax

+

the params

+

params ()

+

Example

+
+put the params
+
+

Description

+

In XION, the params function returns a list of the parameters passed to the currently executing handler, not including the message name. In other words, the params looks like:

+

parameter,parameter,parameter,...

+

In HyperTalk, the params function returns a string containing the message name and the entire parameter list passed to the currently executing handler. The returned string is suitable for the do keyword (if the handler is a message handler) or the value function (if the handler is a function handler). In other words, the params looks like:

+

messageName "parameter","parameter","parameter",...

+

or:

+

functionName("parameter","parameter","parameter",...)

+

See Also

+

param, paramCount

+ + diff --git a/Docs/hyp/2.2/fn/random.html b/Docs/hyp/2.2/fn/random.html new file mode 100644 index 00000000..2b48e25c --- /dev/null +++ b/Docs/hyp/2.2/fn/random.html @@ -0,0 +1,43 @@ + + +HyperTalk 2.2 Functions - random + + + + + + + +

Functions

+

random

+

Supported By

+ +

Syntax

+

[the] random of factor

+

random ( expression )

+

Factor and expression yield integers.

+

Description

+

The random function returns a random integer between 1 and the specified integer, inclusive. If the specified integer is less than 1, the random function always returns 1.

+

Script

+

The following example draws 10 unique random numbers between 1 and 100:

+
+on drawRandom
+  put empty into randomList
+  repeat until the number of items in randomList is 10
+    get random of 100
+    if (the itemdelimiter & it & the itemdelimiter) is not in ¬
+        (the itemdelimiter & randomList & the itemdelimiter) then
+      put it & the itemdelimiter after randomList
+    end if
+  end repeat
+  delete last char of randomList
+  put randomList
+end drawRandom
+
+ + diff --git a/Docs/hyp/2.2/fn/result.html b/Docs/hyp/2.2/fn/result.html new file mode 100644 index 00000000..2a38c377 --- /dev/null +++ b/Docs/hyp/2.2/fn/result.html @@ -0,0 +1,32 @@ + + +HyperTalk 2.2 Functions - result + + + + + + + +

Functions

+

result

+

Supported By

+ +

Syntax

+

the result

+

result ()

+

Example

+
+if the result is not empty then answer "Try again."
+
+

Description

+

The result function returns the return value of the last command executed. Most built-in commands only set the result if the command was executed unsuccessfully; otherwise, the result is set to empty. A user-defined command can set the result with a return statement. The answer and ask commands use the result to tell the script if the user cancelled a prompt instead of choosing a proper response.

+

See Also

+

on, return, ask, answer

+ + diff --git a/Docs/hyp/2.2/fn/round.html b/Docs/hyp/2.2/fn/round.html new file mode 100644 index 00000000..6f9e6fb8 --- /dev/null +++ b/Docs/hyp/2.2/fn/round.html @@ -0,0 +1,320 @@ + + +HyperTalk 2.2 Functions - round + + + + + + + +

Functions

+

round

+

Supported By

+ +

Syntax

+

[the] round of factor

+

round ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+
+put round(steve) into bill
+
+

Description

+

The round function returns the given value rounded towards the nearest integer. If the given value is an integer, the given value is returned. Otherwise, the given value is rounded to the nearest integer. If the fractional part of the given value is exactly .5, the given value is rounded towards unsigned infinity, or away from zero.

+

The following table illustrates the behavior of the round function:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
argumentresult
22
1.752
1.52
1.251
11
0.751
0.51
0.250
00
-0.250
-0.5-1
-0.75-1
-1-1
-1.25-1
-1.5-2
-1.75-2
-2-2
+

If the given value is a complex, the real and imaginary parts of the complex number are each rounded individually.

+

Notes

+

The following table shows the correspondences among the various roundingMethods, rounding functions, and division operators:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
rounding parameterfunctionoperatorjava.math.RoundingMode
to ceilingceilCEILING
to floorfloordiv / modFLOOR
up / to infinityaugUP
down / to zerotruncquot / remDOWN
to nearestroundHALF_UP
to evenrintHALF_EVEN
+

The following table illustrates the behavior of the rounding functions side-by-side:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
argumentceilflooraugtruncroundrint
2222222
1.75212122
1.5212122
1.25212111
1111111
0.75101011
0.5101010
0.25101000
0000000
-0.250-1-1000
-0.50-1-10-10
-0.750-1-10-1-1
-1-1-1-1-1-1-1
-1.25-1-2-2-1-1-1
-1.5-1-2-2-1-2-2
-1.75-1-2-2-1-2-2
-2-2-2-2-2-2-2
+

See Also

+

trunc

+ + diff --git a/Docs/hyp/2.2/fn/seconds.html b/Docs/hyp/2.2/fn/seconds.html new file mode 100644 index 00000000..9adc48a9 --- /dev/null +++ b/Docs/hyp/2.2/fn/seconds.html @@ -0,0 +1,34 @@ + + +HyperTalk 2.2 Functions - seconds + + + + + + + +

Functions

+

seconds

+

Supported By

+ +

Syntax

+

the seconds

+

seconds ()

+

Example

+
+put (the seconds-startTime) into runTime
+
+

Description

+

The seconds function returns an integer representing the number of seconds since midnight, January 1, 1904, known as the Mac OS epoch.

+

Synonym

+

secs

+

See Also

+

convert, date, ticks, time

+ + diff --git a/Docs/hyp/2.2/fn/secs.html b/Docs/hyp/2.2/fn/secs.html new file mode 100644 index 00000000..8002a8d4 --- /dev/null +++ b/Docs/hyp/2.2/fn/secs.html @@ -0,0 +1,34 @@ + + +HyperTalk 2.2 Functions - secs + + + + + + + +

Functions

+

secs

+

Supported By

+ +

Syntax

+

the secs

+

secs ()

+

Example

+
+put (the seconds-startTime) into runTime
+
+

Description

+

The secs function returns an integer representing the number of seconds since midnight, January 1, 1904, known as the Mac OS epoch.

+

Synonym

+

seconds

+

See Also

+

convert, date, ticks, time

+ + diff --git a/Docs/hyp/2.2/fn/serialports.html b/Docs/hyp/2.2/fn/serialports.html new file mode 100644 index 00000000..baa50513 --- /dev/null +++ b/Docs/hyp/2.2/fn/serialports.html @@ -0,0 +1,35 @@ + + +HyperTalk 2.2 Functions - serialPorts + + + + + + + +

Functions

+

serialPorts

+

Supported By

+ +

Syntax

+

the serialPorts

+

serialPorts ()

+

Example

+
+put the serialPorts
+
+

Description

+

The serialPorts function returns a lineEnding-delimited list of communications ports. These are the possible values of the dialingPort property, which determines the port used to dial phone numbers with a modem.

+

Note

+

In HyperTalk, this function existed but was undocumented.

+

Security

+

To use the serialPorts function, OpenXION's security settings must allow the SYSTEM_INFO security key. If the required security key is denied, a script error will be triggered.

+

See Also

+

dial, dialingPort

+ + diff --git a/Docs/hyp/2.2/fn/sin.html b/Docs/hyp/2.2/fn/sin.html new file mode 100644 index 00000000..3865a597 --- /dev/null +++ b/Docs/hyp/2.2/fn/sin.html @@ -0,0 +1,34 @@ + + +HyperTalk 2.2 Functions - sin + + + + + + + +

Functions

+

sin

+

Supported By

+ +

Syntax

+

[the] sin of factor

+

sin ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+
+put the sin of 2 -- yields 0.909297
+
+

Description

+

The sin function returns the sine of the angle that is passed to it. The angle must be expressed in radians.

+

If the argument is an integer or a number, a number is returned. If the argument is a complex, a complex is returned.

+

Note

+

Radians can be converted to degrees with the toDegrees function, or by multiplying by 180 and dividing by pi. Degrees can be converted to radians with the toRadians function, or by multiplying by pi and dividing by 180.

+ + diff --git a/Docs/hyp/2.2/fn/sound.html b/Docs/hyp/2.2/fn/sound.html new file mode 100644 index 00000000..fab8e7c8 --- /dev/null +++ b/Docs/hyp/2.2/fn/sound.html @@ -0,0 +1,36 @@ + + +HyperTalk 2.2 Functions - sound + + + + + + + +

Functions

+

sound

+

Supported By

+ +

Syntax

+

the sound

+

sound ()

+

Examples

+
+put the sound
+
+
+wait until the sound is "done"
+
+

Description

+

The sound function returns the name of the instrument currently playing on the current soundChannel, or the string "done" if no instrument is currently playing.

+

Note

+

The "done" string is a literal; it is not a constant like zero or true. In HyperTalk code, the "done" literal is often left unquoted, but in XION this is highly discouraged.

+

See Also

+

play

+ + diff --git a/Docs/hyp/2.2/fn/speech.html b/Docs/hyp/2.2/fn/speech.html new file mode 100644 index 00000000..408f6471 --- /dev/null +++ b/Docs/hyp/2.2/fn/speech.html @@ -0,0 +1,36 @@ + + +HyperTalk 2.2 Functions - speech + + + + + + + +

Functions

+

speech

+

Supported By

+ +

Syntax

+

the speech

+

speech ()

+

Examples

+
+put the speech
+
+
+wait until the speech is "done"
+
+

Description

+

The speech function returns the currently generated speech text, or the string "done" if no speech is currently being generated.

+

Note

+

The "done" string is a literal; it is not a constant like zero or true. In HyperTalk code, the "done" literal is often left unquoted, but in XION this is highly discouraged.

+

See Also

+

speak

+ + diff --git a/Docs/hyp/2.2/fn/sqrt.html b/Docs/hyp/2.2/fn/sqrt.html new file mode 100644 index 00000000..b37fc2e3 --- /dev/null +++ b/Docs/hyp/2.2/fn/sqrt.html @@ -0,0 +1,33 @@ + + +HyperTalk 2.2 Functions - sqrt + + + + + + + +

Functions

+

sqrt

+

Supported By

+ +

Syntax

+

[the] sqrt of factor

+

sqrt ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+
+put sqrt(opposite^2 + adjacent^2) into hypotenuse
+
+

Description

+

The sqrt function returns the square root of its argument.

+

If the argument is an integer or a number, a number is returned. If the integer or number is negative, NaN is returned. To get a complex result, convert the argument to a complex.

+

If the argument is a complex, a complex is returned.

+ + diff --git a/Docs/hyp/2.2/fn/sum.html b/Docs/hyp/2.2/fn/sum.html new file mode 100644 index 00000000..f8f59114 --- /dev/null +++ b/Docs/hyp/2.2/fn/sum.html @@ -0,0 +1,36 @@ + + +HyperTalk 2.2 Functions - sum + + + + + + + +

Functions

+

sum

+

Supported By

+ +

Syntax

+

[the] sum of factor

+

sum ( expression )

+

Factor and expression yield lists of integers, numbers, or complexes.

+

Example

+
+get sum(1,2,3,4)
+
+

Description

+

The sum function returns the sum of a list of numeric values passed to it.

+

If all the values are integers or numbers, a number is returned. If any value is a complex, a complex is returned.

+

Note

+

This is the infinite-arity version of the + operator.

+

See Also

+

+

+ + diff --git a/Docs/hyp/2.2/fn/systemversion.html b/Docs/hyp/2.2/fn/systemversion.html new file mode 100644 index 00000000..fcfd1db1 --- /dev/null +++ b/Docs/hyp/2.2/fn/systemversion.html @@ -0,0 +1,35 @@ + + +HyperTalk 2.2 Functions - systemVersion + + + + + + + +

Functions

+

systemVersion

+

Supported By

+ +

Syntax

+

the systemVersion

+

systemVersion ()

+

Example

+
+put the systemVersion
+
+

Description

+

The systemVersion function returns the version of the operating system. You might use this to determine whether a script will run correctly under that version of the operating system.

+

Notes

+

In HyperTalk, the resulting value of this function is a number. In XION, the resulting value of this function cannot be guaranteed to be anything other than a string.

+

OpenXION gets the value of this function from the os.version system property.

+

Security

+

To use this function, OpenXION's security settings must allow the SYSTEM_INFO security key. If the required security key is denied, a script error will be triggered.

+ + diff --git a/Docs/hyp/2.2/fn/tan.html b/Docs/hyp/2.2/fn/tan.html new file mode 100644 index 00000000..f661963f --- /dev/null +++ b/Docs/hyp/2.2/fn/tan.html @@ -0,0 +1,34 @@ + + +HyperTalk 2.2 Functions - tan + + + + + + + +

Functions

+

tan

+

Supported By

+ +

Syntax

+

[the] tan of factor

+

tan ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+
+put the tan of 2 -- yields -2.185040
+
+

Description

+

The tan function returns the tangent of the angle that is passed to it. The angle must be expressed in radians.

+

If the argument is an integer or a number, a number is returned. If the argument is a complex, a complex is returned.

+

Note

+

Radians can be converted to degrees with the toDegrees function, or by multiplying by 180 and dividing by pi. Degrees can be converted to radians with the toRadians function, or by multiplying by pi and dividing by 180.

+ + diff --git a/Docs/hyp/2.2/fn/ticks.html b/Docs/hyp/2.2/fn/ticks.html new file mode 100644 index 00000000..78dbef52 --- /dev/null +++ b/Docs/hyp/2.2/fn/ticks.html @@ -0,0 +1,34 @@ + + +HyperTalk 2.2 Functions - ticks + + + + + + + +

Functions

+

ticks

+

Supported By

+ +

Syntax

+

the ticks

+

ticks ()

+

Example

+
+put the ticks into dog
+
+

Description

+

The ticks function returns the number of ticks (sixtieths of a second) since an implementation-specific reference point in time.

+

Note

+

In HyperTalk, the reference point is the last time the computer was turned on or restarted. In OpenXION 1.3 and earlier, the reference point is roughly the release date of the interpreter. In OpenXION 1.4 and later, the reference point is the time when the JVM was started. The XION Scripting Language Standard states only that the reference point must remain constant during the same instance of the interpreter program.

+

See Also

+

date, seconds, time

+ + diff --git a/Docs/hyp/2.2/fn/time.html b/Docs/hyp/2.2/fn/time.html new file mode 100644 index 00000000..55a39469 --- /dev/null +++ b/Docs/hyp/2.2/fn/time.html @@ -0,0 +1,50 @@ + + +HyperTalk 2.2 Functions - time + + + + + + + +

Functions

+

time

+

Supported By

+ +

Syntax

+

the [modifier] time

+

time ()

+

Modifier is short, abbreviated, long, or English. The default is short.

+

Example

+
+put the time
+
+

Description

+

The time function returns a date representing the current time. There are three forms of the time function:

+ + + + + + + + + + + + + +
the short time or the abbrev time12.34 PM
the long time12.34.56 PM
the English time12:34:56 PM
+

Notes

+

The format of the time is dependent on the current locale. This is important if you want to write scripts that work anywhere without modification. You cannot assume that the time function will always return a time in the same format.

+

To prevent issues caused by differing local time formats, use the seconds or the dateItems to store and perform calculations with dates and times.

+

See Also

+

convert, date, seconds, ticks

+ + diff --git a/Docs/hyp/2.2/fn/trunc.html b/Docs/hyp/2.2/fn/trunc.html new file mode 100644 index 00000000..62f3556b --- /dev/null +++ b/Docs/hyp/2.2/fn/trunc.html @@ -0,0 +1,318 @@ + + +HyperTalk 2.2 Functions - trunc + + + + + + + +

Functions

+

trunc

+

Supported By

+ +

Syntax

+

[the] trunc of factor

+

trunc ( expression )

+

Factor and expression yield integers, numbers, or complexes.

+

Example

+

put trunc(steve) into bill

+

Description

+

The trunc function returns the given value rounded towards zero. If the given value is an integer, the given value is returned. Otherwise, the given value is rounded to the integer with the next lowest absolute value and the same sign. In other words, the trunc function returns the integer part of the given value, discarding the fractional part, regardless of sign.

+

The following table illustrates the behavior of the trunc function:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
argumentresult
22
1.751
1.51
1.251
11
0.750
0.50
0.250
00
-0.250
-0.50
-0.750
-1-1
-1.25-1
-1.5-1
-1.75-1
-2-2
+

If the given value is a complex, the real and imaginary parts of the complex number are each rounded individually.

+

Notes

+

The following table shows the correspondences among the various roundingMethods, rounding functions, and division operators:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
rounding parameterfunctionoperatorjava.math.RoundingMode
to ceilingceilCEILING
to floorfloordiv / modFLOOR
up / to infinityaugUP
down / to zerotruncquot / remDOWN
to nearestroundHALF_UP
to evenrintHALF_EVEN
+

The following table illustrates the behavior of the rounding functions side-by-side:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
argumentceilflooraugtruncroundrint
2222222
1.75212122
1.5212122
1.25212111
1111111
0.75101011
0.5101010
0.25101000
0000000
-0.250-1-1000
-0.50-1-10-10
-0.750-1-10-1-1
-1-1-1-1-1-1-1
-1.25-1-2-2-1-1-1
-1.5-1-2-2-1-2-2
-1.75-1-2-2-1-2-2
-2-2-2-2-2-2-2
+

See Also

+

round

+ + diff --git a/Docs/hyp/2.2/fn/value.html b/Docs/hyp/2.2/fn/value.html new file mode 100644 index 00000000..4d5da01b --- /dev/null +++ b/Docs/hyp/2.2/fn/value.html @@ -0,0 +1,45 @@ + + +HyperTalk 2.2 Functions - value + + + + + + + +

Functions

+

value

+

Supported By

+ +

Syntax

+

[the] value of factor

+

value ( expression )

+

Factor and expression yield any string.

+

Example

+
+put the value of myFormula into myResult
+
+

Description

+

The value function evaluates the string passed to it as an XION expression. The string is evaluated as if it were inserted inside parentheses in place of the value function call.

+

If the string does not form a single valid expression, the string itself is returned.

+

Script

+

The following example demonstrates the value function:

+
+on demoValue
+  put "3 + 4" into expression
+  put expression -- yields "3 + 4"
+  put the value of expression -- yields 7
+end demoValue
+
+

Security

+

To evaluate arbitrary XION expressions with this function, OpenXION's security settings must allow the DO_AND_VALUE security key. If the required security key is denied, a script error will be triggered.

+

See Also

+

do

+ + diff --git a/Docs/hyp/2.2/fn/version.html b/Docs/hyp/2.2/fn/version.html new file mode 100644 index 00000000..2d941697 --- /dev/null +++ b/Docs/hyp/2.2/fn/version.html @@ -0,0 +1,29 @@ + + +HyperTalk 2.2 Functions - version + + + + + + + +

Functions

+

version

+

Supported By

+ +

Syntax

+

[the] version of factor

+

version ( expression )

+

Factor and expression yield some object or the name of some component that has a version number.

+

Description

+

The version function returns the version number of an object or component.

+

Security

+

To use this function, OpenXION's security settings must allow the SYSTEM_INFO security key. If the required security key is denied, a script error will be triggered.

+ + diff --git a/Docs/hyp/2.2/fn/voices.html b/Docs/hyp/2.2/fn/voices.html new file mode 100644 index 00000000..ebb87489 --- /dev/null +++ b/Docs/hyp/2.2/fn/voices.html @@ -0,0 +1,31 @@ + + +HyperTalk 2.2 Functions - voices + + + + + + + +

Functions

+

voices

+

Supported By

+ +

Syntax

+

the voices

+

voices ()

+

Example

+
+put the voices
+
+

Description

+

The voices function returns a lineEnding-delimited list of voices currently available for use with the speak command.

+

See Also

+

speak

+ +