- Commit
- a5966b2be3cac60141c74f18608ddd6e6cc37cb6
- Parent
- 3ab7b22bb6a2ccbf780f8e21c53ba1ffb64d7e6c
- Author
- Pablo <pablo-escobar@riseup.net>
- Date
Added examples to the manpage
A OCaml module for manipulating unlimited register machines
Added examples to the manpage
1 file changed, 32 insertions, 1 deletion
Status | File Name | N° Changes | Insertions | Deletions |
Modified | urm.1 | 33 | 32 | 1 |
diff --git a/urm.1 b/urm.1 @@ -6,7 +6,7 @@ .\" .\" Unlimited Register Machine simulator .\" -.\" Copyright (C) 2022 Pablo +.\" Copyright (C) 2023 Pablo .\" Free use of this software is granted under the terms of the GPL-3.0 License .TH "MAN" "1" "2023-03-19" "\ \&" "\ \&" .ie \n(.g .ds Aq \(aq @@ -53,6 +53,37 @@ Sets the initial value of the \fIN\fP-th register to \fIV\fP .RS 4 Prints the value of the \fIN\fP-th register at the end of execution .RE +.SH "EXAMPLES" +.sp +.if n .RS 4 +.nf +.fam C +$ # computes R1 mod R2 and stores it in R3 +$ ./urm examples/mod.urm \-R1=2023 \-R2=5 \-R3 +R3 = 3 +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C +$ # computes the R1\-th Fibonacci number and stores it in R2 +$ ./urm examples/fibonacci.urm \-R1=12 \-R2 +R2 = 144 +.fam +.fi +.if n .RE +.sp +.if n .RS 4 +.nf +.fam C +$ # computes the factorial of R1 and stores it in R2 +$ ./urm examples/factorial.urm \-R1=6 \-R2 +R2 = 720 +.fam +.fi +.if n .RE .SH "AUTHORS" .sp \fBurm\fP was written by Pablo