A single "=" sign is for setting a variable's value.  A double equals
"==" is for comparisons, which is what you appear to be doing in your
example.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Dinesh Sharma
Sent: Tuesday, July 05, 2005 12:44 PM
To: [email protected]
Subject: st: programming questions
Given below is a forval loop I am working on
forval k=1(1)10{
       if `k'=1{
          commands
       }
       else{
          commands
       }
}
The if part of the above program is giving error message. I will 
appreciate any suggestions.
Thanks
Dinesh
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/