mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
update error_table[] E_STRING symbols
Now the "E_STRING" errsym strings in error_table[], with exception to the 1st E__BASE entry, all other errsym strings must match the following regular expression: ^E_[A-Z][A-Z0-9_]+$ Renamed "E_1OVER0" to "E_DIVBYZERO". Renamed "E_0OVER0" to "E_ZERODIVZERO".
This commit is contained in:
4
func.c
4
func.c
@@ -3348,7 +3348,7 @@ f_coth(int count, VALUE **vals)
|
||||
switch (vals[0]->v_type) {
|
||||
case V_NUM:
|
||||
if (qiszero(vals[0]->v_num))
|
||||
return error_value(E_1OVER0);
|
||||
return error_value(E_DIVBYZERO);
|
||||
result.v_num = qcoth(vals[0]->v_num, err);
|
||||
result.v_type = V_NUM;
|
||||
break;
|
||||
@@ -3453,7 +3453,7 @@ f_csch(int count, VALUE **vals)
|
||||
switch (vals[0]->v_type) {
|
||||
case V_NUM:
|
||||
if (qiszero(vals[0]->v_num))
|
||||
return error_value(E_1OVER0);
|
||||
return error_value(E_DIVBYZERO);
|
||||
result.v_num = qcsch(vals[0]->v_num, err);
|
||||
result.v_type = V_NUM;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user