Fun 0.41.5
The programming language that makes You have fun
Loading...
Searching...
No Matches
round.c File Reference

Implements the OP_ROUND opcode using C99 math.h round(). C99 round() rounds half away from zero. More...

#include <math.h>
Include dependency graph for round.c:

Go to the source code of this file.

Functions

 if (v.type==VAL_INT)
 exit (1)

Variables

case OP_ROUND
 else
 break

Detailed Description

Implements the OP_ROUND opcode using C99 math.h round(). C99 round() rounds half away from zero.

Definition in file round.c.

Function Documentation

◆ exit()

exit(1)

◆ if()

if(v.type = VAL_INT)

Definition at line 20 of file round.c.

Here is the call graph for this function:

Variable Documentation

◆ break

break

Definition at line 40 of file round.c.

◆ else

else
Initial value:
{
fprintf(stderr, "Runtime type error: ROUND expects number, got %s\n", value_type_name(v.type))
Value v
Definition cast.c:22
#define fprintf
Definition vm.c:200

Definition at line 36 of file round.c.

◆ OP_ROUND

case OP_ROUND

Definition at line 18 of file round.c.