Please enable JavaScript to view this site.

A-Shell Reference

Updated December 2023, see History

Function

Description

SIN(x)

Sine of x

COS(x)

Cosine of x

TAN(x)

Tangent of x

ATN(x)

Arctangent of x

ASN(x)

Arcsine of x

ACS(x)

Arccosine of x

DATN(y,x)

Double arctangent

 

History

2023 December, A-Shell 7.0.1752: DATN (double arctangent function) is no longer treated as a keyword if it appears in a MAP statement first.

2023 February, A-Shell 6.5.1725:  add support for the DATN function ("double arctangent", aka "four-quadrant inverse tangent") which was somehow overlooked during the original implementation of the other trigonometric functions supported in AlphaBASIC, and whose absence was creating a nuisance for a very select set of mathematically-inclined A-Shell developers.

Note that although DATN(y,x) may seem like a typo, it actually makes more sense than DATN(x,y) as it matches the geometric interpretation, i.e. DATN(y,x) is the angle between the x-axis and the line passing through the origin (0,0) and the point (x,y). Thanks to Bob Fowler for pointing this out.

Also note that for full backwards compatibility with AlphaBASIC, the function is recognized in all variations of the compiler (OCMPIL, COMPIL, COMPLP). However, since it requires A-Shell runtime 6.5.1725.0+, by default the compiler will set the minimum runtime version in the RUN header, which in the case of OCMPIL changes the header signature from &hF002 to &hF202 (use VERSYS to display), making the RUN file incompatible with AMOS. If, for some reason you need to create an AMOS-compatible RUN file containing the DATN(x,y) function, add the /F1 switch to the compilation to disable the minimum version information in the RUN header.