**basic.int**Function/BASIC Program

# basic.int

Command | basic.int Function/BASIC ProgramApplicable release versions: AP, R83 |
---|---|

Category | BASIC Program (486) |

Description | returns the numeric integer equivalent from a given expression. |

Syntax | int(num.expression) |

Options | |

Example | print int(5.1) 5 This simple example truncates the decimal and returns the integer portion of the number. x = 10.25 y = int(x*10)/10 print y 10.2 This is an example of how you can use the "int" function to keep one decimal place and truncate the rest. |

Purpose | |

Related |
basic.statements basic.precision basic.num.expression basic.abs basic.functions |