Hi everyone,

I am trying to run the following code:

count if productcode == 21
scalar nobs = r(N)
local n nobs
forvalues b = 1(1)`n' {
display `b'
}

However, I get invalid syntax error. Can anyone help me on this issue? Thanks in advance.

Best,
Ulas