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

Implements the OP_TRUNC opcode using C99 math.h trunc(). More...

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

Go to the source code of this file.

Functions

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

Variables

case OP_TRUNC
 else
 break

Detailed Description

Implements the OP_TRUNC opcode using C99 math.h trunc().

Definition in file trunc.c.

Function Documentation

◆ exit()

exit(1)

◆ if()

if(v.type = VAL_INT)

Definition at line 19 of file trunc.c.

Here is the call graph for this function:

Variable Documentation

◆ break

break

Definition at line 39 of file trunc.c.

◆ else

else
Initial value:
{
fprintf(stderr, "Runtime type error: TRUNC 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 35 of file trunc.c.

◆ OP_TRUNC

case OP_TRUNC

Definition at line 17 of file trunc.c.