what does the message *ampl? mean?

259 views
Skip to first unread message

raits77

unread,
Jul 11, 2012, 12:18:26 PM7/11/12
to am...@googlegroups.com

Hello,

When I run my model I get the *ampl? in the last line instead of ampl? or
ampl;
The problem is that I cannot add any other commands and I have to close the
terminal window (I'm using a mac) and reopen it. I cannot display any of the
variables or get a .out file.

I appreciate your help.
Thanks
--
View this message in context: http://old.nabble.com/what-does-the-message-*ampl--mean--tp34146630p34146630.html
Sent from the AMPL mailing list archive at Nabble.com.

victor.z...@gmail.com

unread,
Jul 11, 2012, 12:39:25 PM7/11/12
to am...@googlegroups.com
The "ampl?" prompt means that the last declaration or statement was incomplete and AMPL is waiting for additional input. Most likely a terminating semicolon is missing in the last declaration or statement of your model.

For example, the following incomplete command gives you the "ampl?" prompt:

  ampl: print 42

Entering semicolon completes the statement, making AMPL to print 42 and give you the normal "ampl:" prompt:

  ampl? ;
  42
  ampl:

HTH,
Victor

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To post to this group, send email to am...@googlegroups.com.
To unsubscribe from this group, send email to ampl+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ampl?hl=en.


raits77

unread,
Jul 11, 2012, 12:52:45 PM7/11/12
to am...@googlegroups.com

Hello Victor,

Thanks for the help, but what about when the prompt is "*ampl?" and not
"ampl?"? When the "*" is also there then entering ";" does not result in
"ampl:" but the "*ampl?" appears again. What can I do in that case. I
checked my files (.mod, .dat and .run) and they all end with ";".

Thanks,
Raido
View this message in context: http://old.nabble.com/what-does-the-message-*ampl--mean--tp34146630p34146835.html

victor.z...@gmail.com

unread,
Jul 11, 2012, 1:13:47 PM7/11/12
to am...@googlegroups.com
Sorry, I didn't notice '*'. The "*ampl:" prompt means that you have an unterminated comment, for example:

ampl: /* abc
*ampl: 

Regards,
Victor
Reply all
Reply to author
Forward
0 new messages