coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- 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?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?
Thanks.
--Reaz
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
- [Coq-Club] print string in coq-8.1.pl3, reaz
- Re: [Coq-Club] print string in coq-8.1.pl3, Yves Bertot
- Re: [Coq-Club] print string in coq-8.1.pl3,
reaz
- Re: [Coq-Club] print string in coq-8.1.pl3,
Yves Bertot
- Re: [Coq-Club] print string in coq-8.1.pl3, Gregory Malecha
- Re: [Coq-Club] print string in coq-8.1.pl3,
Yves Bertot
- Re: [Coq-Club] print string in coq-8.1.pl3,
reaz
- Re: [Coq-Club] print string in coq-8.1.pl3, Yves Bertot
Archive powered by MhonArc 2.6.16.