Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Macro parsing question.


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Macro parsing question.
Date   Thu, 14 Feb 2013 19:02:41 +0000

To expand on this, Amadou, the key points are that

1. What your loop does is dependent only on the last item processed,
as each result overwrites the previous one.

2. So the loop is not needed to produce the same result.

3. If you want something else, as I guess, you have to tell us what that is.

Nick

On Thu, Feb 14, 2013 at 6:54 PM, Jeph Herrin <[email protected]> wrote:
> Got it.
>
>
> On 2/14/2013 1:27 PM, Nick Cox wrote:
>>
>> That line of code which I wrote earlier  is what Amadou's earlier
>> example boils down to.
>>
>> It is not a suggestion for what Amadou should use, and cannot be, because
>>
>> 1. Amadou has implied that he does not want that result.
>>
>> 2. I don't know what Amadou really wants to do. He hasn't described
>> the problem he wants to solve.
>>
>> Nick
>>
>> On Thu, Feb 14, 2013 at 6:15 PM, Jeph Herrin <[email protected]> wrote:
>>>
>>>
>>>
>>> On 2/14/2013 4:55 AM, Nick Cox wrote:
>>>>
>>>>
>>>> Should be
>>>>
>>>> local d = cond("a" == "c", "%", "Value")
>>>>
>>>
>>> Note the condition is never true. Maybe you mean:
>>>
>>>   local d = cond("`k'"=="a", "%","Value")
>>>
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/faqs/resources/statalist-faq/
>> *   http://www.ats.ucla.edu/stat/stata/
>>
>>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index