STOP command

Hi,

I am running a maximum likelihood optimization with the OPTMUM command in a code from someone else. I found that there is a STOP; under the optmum command.

I am not fully sure how this command affects the maximization process.

Any help with that?

 

Thanks in advance.

 

 

1 Answer



0



The stop command ends or stops a program. It is similar to the end command in GAUSS. However, the end command will close any open output files, where stop will not. For example, if you run this program:

output file = test.txt reset;
print seqa(1, 1, 5);
stop;
print "still in the command file, but after stop";

and then from the GAUSS command prompt enter:

print "program has finished";

and then look at the file test.txt, you will see that the file contains something like this:

1.00
2.00
3.00
4.00
5.00
program has finished

By default all GAUSS programs end with the equivalent of the stop command. So one way to think about adding a stop command would be either deleting or commenting out every statement after the stop command.

For comparison, if we changed the program above to use end instead of stop, like this:

output file = test.txt reset;
print seqa(1, 1, 5);
end;
print "still in the command file, but after end";

and then entered:

print "program has finished";

We would see:

1.00
2.00
3.00
4.00
5.00

The end command is equivalent to these three commands in order:

closeall(); //close all open file handles
output off; //stop sending printed output to the 'output' file
stop; //quit executing the GAUSS program

aptech

1,773

Your Answer

1 Answer

0

The stop command ends or stops a program. It is similar to the end command in GAUSS. However, the end command will close any open output files, where stop will not. For example, if you run this program:

output file = test.txt reset;
print seqa(1, 1, 5);
stop;
print "still in the command file, but after stop";

and then from the GAUSS command prompt enter:

print "program has finished";

and then look at the file test.txt, you will see that the file contains something like this:

1.00
2.00
3.00
4.00
5.00
program has finished

By default all GAUSS programs end with the equivalent of the stop command. So one way to think about adding a stop command would be either deleting or commenting out every statement after the stop command.

For comparison, if we changed the program above to use end instead of stop, like this:

output file = test.txt reset;
print seqa(1, 1, 5);
end;
print "still in the command file, but after end";

and then entered:

print "program has finished";

We would see:

1.00
2.00
3.00
4.00
5.00

The end command is equivalent to these three commands in order:

closeall(); //close all open file handles
output off; //stop sending printed output to the 'output' file
stop; //quit executing the GAUSS program

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.