Skip to main content

math_string

Function math_string 

Source
pub fn math_string(name: &str, arg: &str, id: i32) -> mnumber
Expand description

Port of math_string(UNUSED(char *name), char *arg, int id) from Src/Modules/mathfunc.c:439. The string-arg math-fn dispatcher behind rand48("seedvar") and future string-takers. C signature: static mnumber math_string(char *name, char *arg, int id)

Strips leading/trailing iblank from arg (mathfunc.c:447-451) then switches on id. Currently only MS_RAND48 exists; the random-bit production lives in crate::ported::random and crate::ported::modules::random_real. Returns zero_mnumber for unrecognised ids (matching C’s pre-init ret = zero_mnumber).