🐐 LONGITVDO on strings
This commit is contained in:
@@ -481,9 +481,10 @@ CentValue cent_avdi_numerus(void) {
|
||||
}
|
||||
|
||||
CentValue cent_longitudo(CentValue v) {
|
||||
if (v.type != CENT_LIST)
|
||||
cent_type_error("'LONGITVDO' requires a list");
|
||||
return cent_int(v.lval.len);
|
||||
if (v.type == CENT_LIST) return cent_int(v.lval.len);
|
||||
if (v.type == CENT_STR) return cent_int((long)strlen(v.sval));
|
||||
cent_type_error("'LONGITVDO' requires a list or string");
|
||||
return cent_null(); /* unreachable; silences warning */
|
||||
}
|
||||
|
||||
CentValue cent_fortis_numerus(CentValue lo, CentValue hi) {
|
||||
|
||||
Reference in New Issue
Block a user