Question
· May 21, 2021

How to extract numbers from a numerical stream using Cache Objectscript

Hey I am very new to Intersystems Objectscript and I am trying to find a way of extract 4 digit numbers from a stream.

I have a stream full of results 

2334

3434

5543

4334

 

And I am trying to remove each 4 digit grouping from the stream.

I have tried the following for loop 

for i=1:1:$length(result) {

set curr = $extract(result, i)

write !, curr

set count(curr) = $get(count(curr)) + 1

}

 

Unfortunately the loop extracts one digit.

Does anyone have any suggestions on how to solve this ?

Product version: IRIS 2020.1
Discussion (6)0
Log in or sign up to continue