[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

System Specification for C65Fred BowenMarch 1, 1991

3.1.3 BASIC 10.0 COMMAND AND FUNCTION DESCRIPTION

ABS - Absolute value function

                              ABS (expression)

The ABSolute value function returns the unsigned value of the numeric expression.

                    X = ABS (1)             Result is X = 1
                    X = ABS (-1)            Result is X = 1

AND - Boolean operator

                         expression AND expression

The AND operator returns a numeric value equal to the logical AND of two numeric expressions, operating on the binary value of signed 16-bit integers in the range (-32768 to 32767). Numbers outside this range result in an 'ILLEGAL QUANTITY' error.

                    X = 4 AND 12            Result is X=4
                    X = 8 AND 12            Result is X=8
                    X = 2 AND 12            Result is X=0

In the case of logical comparisons, the numeric value of a true . situation is -1 (equivalent to 65535 or $FFFF hex) and the numeric value of a false situation is zero.

      X = ("ABC"="ABC") AND ("DEF"="DEF")   Result is X=-l (true)
      X = ("ABC"="ABC") AND ("DEF"="XYZ")   Result is X= 0 (false)

APPEND - open a disk file and prepare to append data to it

     APPEND# logical-file-number, "filename" [,Ddrive] [<ON|,>Udevice]

Opens filename for writing, and positions the file pointer at the end of the file. Subsequent PRINT# statements to the logical file number will cause data to be appended to the end of this file. If the file does not exist, it will be created.

            APPEND#1, "filename"
            APPEND#1, (file$), ON U(unit)

ASC - PETSCII value function

                                ASC (string)

This function returns the PETSCII numeric value of the first character of a string. The PETSCII value of an empty (null) string is zero. This function is the opposite of the CHR$ function. Refer to the Table of PETSCII Character Codes.

                    X = ASC("ABC")          Result is X=65
                    X = ASC("")             Result is X=0

ATN - Arc tangent function

                              ATN (expression)


[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated April 09, 2006.