# Gambas Functional Listing

The purpose of this page is to group various keywords and built-in functions in Gambas by their function. This allows someone attempting to do something to get an idea of what they may use to accomplish a particular task.

- Gambas Functional Listing
  - Arithmetic
    - Functions
    - Operators
  - Bit operations
    - Functions
    - Operators
  - Looping
    - Control Keywords
    - Exit Keywords
  - String Functions
  - Termination
  - Trigonometric Functions

## Arithmetic

A general list of all the built-in functions that return a numeric value.

### Functions

These functions all return numeric values.

> Abs | Acs / ACos | Acsh / ACosh | Asn / ASin | Asnh / ASinh | Atn / ATan | Atnh / ATanh | BChg | BClr | BSet | BTst | CBool | CFloat | CInt / CInteger | Cos | Cosh | CShort | Day | Deg | Exp | Fix | Frac | Hour | InStr | Int | Len | Lof | Log | Log10 | Max | Min | Minute | Month | Pi | Rad | RInStr | Rnd | Rol | Ror | Round | Second | Sgn | Shl | Shr | Sin | Sinh | Sqr | Tan | Tanh | Val | WeekDay | Year

### Operators

These operators manipulate one or more numeric values and return a numeric value.

> AND | DEC | INC | LIKE | MOD | NOT | OR | XOR

## Bit operations

Used to manipulate or examine individual bits in a number, or the binary value of a number, or return true/false values.

### Functions

- BChg | BClr | BSet | BTst | Rol | Ror | Shl | Shr

### Operators

- AND | NOT | OR | XOR

## Looping

These keywords are used for programming various types of loops, depending on whether one needs to increment a variable, execute a loop zero or more times, or execute a loop at least one time. These also include keywords used to exit a loop.

### Control Keywords

These control the scope of a loop, either by delimiting the beginning or end of a loop.

> DO | FOR | FOR EACH | LOOP | NEXT | REPEAT | UNTIL | WHILE

### Exit Keywords

These keywords provide for exiting or restarting a loop, or skipping parts of it to go on to the next iteration.

> BREAK | CONTINUE

## String Functions

These functions return a string value.

> LTrim$ | Left$ | Lower$ / LCase$ | Mid$ | RTrim$ | Replace$ | Right$ | Space$ | Split | String$ | Subst$ | Trim$ | Upper$ / UCase$

## Termination

These are the keywords that end a program, procedure or function, or exit back to the caller.

> END | QUIT | RETURN | STOP

## Trigonometric Functions

These are the functions that are used to compute angles, spherical and wave values, and similar results.

> Acs / ACos | Acsh / ACosh | Asn / ASin | Asnh / ASinh | Atn / ATan | Atnh / ATanh | Cos | Cosh | Deg | Exp | Log | Log10 | Pi | Rad | Sin | Sinh | Sqr | Tan | Tanh