Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: "looping" within a command

From   Devra Golbe <>
Subject   Re: st: RE: "looping" within a command
Date   Wed, 13 Oct 2004 11:41:22 -0400

Thanks Nick-- this solves my problem very neatly. While trace lets me confirm that the `j++' notation increments by 1 from 217, just as it ought, I don't understand the syntax. Can you point me to the section of the manuals where I can read up on this?


At 10:11 AM 10/13/2004, you wrote:

I take it from this that you always have a -name- and -id-
variable: what differs are the number of -a*-.

If you know N in advance you could build up your -infix-
call like this:

local N = <whatever>
local call "str name 124-143 str id 144-152"
local j = 217
forval i = 1/`N' {
        local call "`call' str a`i' `j++'"


infix `call' using rawdata.txt


*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index