Page 1 of 1

MUltiple Subscripts

Posted: September 1st, 2022, 4:08 am
by Raiju311996
Hi, how can I simplify multiple subcripts in batch editing.

example
PROC K4

if K4(1) = 1 or K4(2) = 1 or K4(3) = 1 or K4(4) = 1 or K4(5) = 1 or K4(6) = 1 then
errmgs("error");
endif

Re: MUltiple Subscripts

Posted: September 1st, 2022, 7:39 am
by Gregory Martin
There's no direct way to simplify this by specifying multiple occurrences in the check. However, if K4 has only six occurrences, you could write this:
if K4 has 1 then
Or if it has more than six occurrences, but you only want to check the first six, you could write:
if seek(K4 where K4 = 1) in 1:6 then