1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-11 06:24:35 +00:00

fix: setting blank value to 0 in mf_isint()

This commit is contained in:
Allan Bowe
2022-04-26 14:04:54 +00:00
parent 8484c752ed
commit cc1b971e19
2 changed files with 12 additions and 1 deletions

View File

@@ -20,8 +20,11 @@
%macro mf_isint(arg
)/*/STORE SOURCE*/;
/* remove minus sign if exists */
/* blank val is not an integer */
%if "&arg"="" %then %do;0%return;%end;
/* remove minus sign if exists */
%local val;
%if "%substr(%str(&arg),1,1)"="-" %then %let val=%substr(%str(&arg),2);
%else %let val=&arg;

View File

@@ -30,4 +30,12 @@
),
desc=Checking mf_isint(-1),
outds=work.test_results
)
%mp_assert(
iftrue=(
"%mf_isint()"="0"
),
desc=Checking mf_isint(),
outds=work.test_results
)