floor
floor. The floor function converts a number to its integer value, eliminating any fractional part.
Runs on: either side: the compiler places the statement that calls it where the values it uses live.
Format:
floor(value)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | number | the number to be converted |
Returned Value:
| Type | Description |
|---|---|
| number | the resulting integer value |
Examples
dollars_only = floor(price)