Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] print string in coq-8.1.pl3

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] print string in coq-8.1.pl3


chronological Thread 
  • From: Yves Bertot <Yves.Bertot AT sophia.inria.fr>
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] print string in coq-8.1.pl3
  • Date: Mon, 03 Aug 2009 07:56:11 +0200
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

reaz wrote:
Can any one tell me how to print an arbitrary string in coq-8.1.pl3?

Thanks.
--Reaz
What do you mean by "printing"? At what time do you want to print something? Or do you just want to write a program that returns a string and evaluate this program to see its result?

For the latter just use "Eval compute".  Here is an example:

Require Import String.
Open Scope string_scope.
Eval compute in ("Hello " ++ "world!").


If you want side effects to occur in the middle of goal-directed proofs, you can also ask fail and idtac to display a message that you gave them as argument. This is explained in the documentation for these tactics (pp. 197-198 in the pdf version of the reference manual).

Yves





Archive powered by MhonArc 2.6.16.

Top of Page