Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: AW: st: calling a program


From   Michael Norman Mitchell <Michael.Norman.Mitchell@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: AW: st: calling a program
Date   Thu, 29 Apr 2010 01:20:00 -0700

Dear Martin
  Thank you for catching that... indeed, the corrected version should be...

--- begin progone.ado ---
program define progone
   display "hello from program one"
   progtwo
end

program define progtwo
   display "hello from program two"
end
--- end progone.ado ---


Michael N. Mitchell
See the Stata tidbit of the week at...
http://www.MichaelNormanMitchell.com

On 2010-04-29 12.56 AM, Martin Weiss wrote:
<>

Michael, should the third line be "progtwo" instead of "two"? Interestingly,
a call to "two" prompts Stata to give you a blank -twoway- graph.



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Michael Norman
Mitchell
Gesendet: Donnerstag, 29. April 2010 09:49
An: statalist@hsphsun2.harvard.edu
Cc: Bülent Güloğlu
Betreff: Re: st: calling a program

Greetings

    Here is an example... this is a program called "progone.ado" which
calls the subprogram "progtwo" that is contained within it.

--- begin progone.ado ---
program define progone
    display "hello from program one"
    two
end

program define progtwo
    display "hello from program two"
end
--- end progone.ado ---

and here is the output from the -progone- command.

. progone
hello from program one
hello from program two

    Is that what you were asking?

Best regards,

Michael N. Mitchell
See the Stata tidbit of the week at...
http://www.MichaelNormanMitchell.com

On 2010-04-29 12.30 AM, Bülent Güloğlu wrote:
HELLO
When I call a subprogram stata tells me unregonized command
How can I can call a subprogram
Bulent

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/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/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/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index