w****g 发帖数: 81 | 1 我好像是没错的
SYMBOLGEN: Macro variable SUM_CURRENT_GRP resolves to 5.73
SYMBOLGEN: && resolves to &.
SYMBOLGEN: Macro variable I resolves to 9
SYMBOLGEN: Macro variable GRP9 resolves to 42.489
MLOGIC(GRP): %IF condition &sum_current_grp. < &&grp&i. is FALSE **wrong
SYMBOLGEN: Macro variable SUM_CURRENT_GRP resolves to 1.35
SYMBOLGEN: && resolves to &.
SYMBOLGEN: Macro variable I resolves to 10
SYMBOLGEN: Macro variable GRP10 resolves to 8.073
MLOGIC(GRP): %IF condition &sum_current_grp. < &&grp&i. is TRUE **correct
SYMBOLGEN: Macro variable SUM_CURRENT_GRP resolves to 2.28
SYMBOLGEN: && resolves to &.
SYMBOLGEN: Macro variable I resolves to 17
SYMBOLGEN: Macro variable GRP17 resolves to 137.826
MLOGIC(GRP): %IF condition &sum_current_grp. < &&grp&i. is FALSE **wrong
SYMBOLGEN: Macro variable SUM_CURRENT_GRP resolves to 1.96
SYMBOLGEN: && resolves to &.
SYMBOLGEN: Macro variable I resolves to 18
SYMBOLGEN: Macro variable GRP18 resolves to 158.976
MLOGIC(GRP): %IF condition &sum_current_grp. < &&grp&i. is TRUE **correct |
A*******s 发帖数: 3942 | 2 i don't quite get it.
did u use %sysevalf()?
【在 w****g 的大作中提到】 : 我好像是没错的 : SYMBOLGEN: Macro variable SUM_CURRENT_GRP resolves to 5.73 : SYMBOLGEN: && resolves to &. : SYMBOLGEN: Macro variable I resolves to 9 : SYMBOLGEN: Macro variable GRP9 resolves to 42.489 : MLOGIC(GRP): %IF condition &sum_current_grp. < &&grp&i. is FALSE **wrong : SYMBOLGEN: Macro variable SUM_CURRENT_GRP resolves to 1.35 : SYMBOLGEN: && resolves to &. : SYMBOLGEN: Macro variable I resolves to 10 : SYMBOLGEN: Macro variable GRP10 resolves to 8.073
|
w****g 发帖数: 81 | 3 I did, got same results, actually no need to use %sysevalf() for number.
【在 A*******s 的大作中提到】 : i don't quite get it. : did u use %sysevalf()?
|
r***k 发帖数: 13586 | 4 macro variable的值都是字符串,所以macro比较符号比的也是字符串。你一定要比数
值可以考虑两个相减后和负号比。 |
A*******s 发帖数: 3942 | 5 i got different results with or without %sysevalf()
【在 w****g 的大作中提到】 : I did, got same results, actually no need to use %sysevalf() for number.
|
f*****k 发帖数: 110 | 6 看来我的macro白学了,问题都看不明白。
【在 w****g 的大作中提到】 : 我好像是没错的 : SYMBOLGEN: Macro variable SUM_CURRENT_GRP resolves to 5.73 : SYMBOLGEN: && resolves to &. : SYMBOLGEN: Macro variable I resolves to 9 : SYMBOLGEN: Macro variable GRP9 resolves to 42.489 : MLOGIC(GRP): %IF condition &sum_current_grp. < &&grp&i. is FALSE **wrong : SYMBOLGEN: Macro variable SUM_CURRENT_GRP resolves to 1.35 : SYMBOLGEN: && resolves to &. : SYMBOLGEN: Macro variable I resolves to 10 : SYMBOLGEN: Macro variable GRP10 resolves to 8.073
|
w****g 发帖数: 81 | 7 hey, I use this one and it works: %IF %sysevalf( &sum_current_grp. < &&grp&i
.) %then
thanks for all the advices!
【在 A*******s 的大作中提到】 : i got different results with or without %sysevalf()
|
d******9 发帖数: 404 | 8 Hehe, everything in macro is text, so macro compares them as characters.
As numeric, 5.73 < 42.489.
However, as character string, 5.73 > 42.489.
Therefore, you need use %sysevalf if you want to compare their numeric
values.
&i
【在 w****g 的大作中提到】 : hey, I use this one and it works: %IF %sysevalf( &sum_current_grp. < &&grp&i : .) %then : thanks for all the advices!
|
s*r 发帖数: 2757 | 9 i like mprint mlogic option on |
s*r 发帖数: 2757 | 10 i like mprint mlogic option on |