MUltiple Subscripts

Discussions about editing and cleaning data
Forum rules
New release: CSPro 8.0
Post Reply
Raiju311996
Posts: 1
Joined: September 1st, 2022, 4:01 am

MUltiple Subscripts

Post 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
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: MUltiple Subscripts

Post 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
Post Reply