warn_int_div_impl: Warn about literal integer division in model code

View source: R/RcppExports.R

warn_int_div_implR Documentation

Warn about literal integer division in model code

Description

Scans each element of code and issues an R warning for every instance of literal integer division found (e.g. 3/4, 1/2). Integer division in C++ truncates toward zero, so 3/4 evaluates to 0 and 7/3 evaluates to 2, which is rarely intended.

Usage

warn_int_div_impl(code, block)

Arguments

code

Character vector of source lines.

block

Name of the model block, included in the warning message.

Value

code unchanged (called for its side-effect warnings).


mrgsolve documentation built on May 20, 2026, 9:06 a.m.