Commit Graph

9 Commits

Author SHA1 Message Date
Julien Fischer
9c96387183 Fix formatting of sample programs.
samples/Mmakefile:
    Add the beer program to list of targets.

samples/*.m:
    Convert (C->T;E) to (if C then T else E).

    Delete trailing whitespace.

    Use predmode syntax instead of separate pred and mode
    declarations.

samples/interpreter.m:
    Fix up one predicate that had some clauses that used
    DCGs and others that used state variables.

    Don't use the name 'IO' for something that isn't the I/O state.

samples/diff/*.m:
samples/c_interface/c_calls_mercury/mercury_main.m:
samples/c_interface/short_example.m:
    Delete trailing whitespace.
2015-12-14 16:06:13 +11:00
Julien Fischer
a20fb1cf57 Further code and formatting cleanups. There are no changes
Branches; main, 11.01

samples/*.m:
	Further code and formatting cleanups.  There are no changes
	to any algorithms.
2011-01-10 02:29:33 +00:00
Zoltan Somogyi
5fb5874ba3 Fix some violations of good style in the sample programs.
Estimated hours taken: 0.3
Branches: main, release

samples/*.m:
	Fix some violations of good style in the sample programs.
2005-08-12 04:50:37 +00:00
Ian MacLarty
c3e0be6dca Bring some samples up to date with current coding standards.
Estimated hours taken: 1.0
Branches: main and 0.12

Bring some samples up to date with current coding standards.

samples/calculator.m
samples/calculator2.m
samples/cat.m
samples/e.m
samples/eliza.m
samples/expand_terms.m
samples/hello.m
samples/interpreter.m
samples/sort.m
samples/ultra_sub.m
	Bring up to date with current coding standards.
2005-02-09 08:41:13 +00:00
Zoltan Somogyi
70df929cde Fix formatting.
Estimated hours taken: 0.1
Branches: main

samples/cat.m:
	Fix formatting.
2004-08-30 05:06:10 +00:00
Fergus Henderson
dc4678527c Simplify the code a little.
Estimated hours taken: 0.1

samples/cat.m:
	Simplify the code a little.
1998-11-04 17:41:20 +00:00
Andrew Bromage
586c5e16c6 Implement io__read_line_as_string/{3,4}.
Estimated hours taken: 10

library/io.m:
library/io.nu.nl:
	Implement io__read_line_as_string/{3,4}.

	Also sneaked in here are some trivial whitespace fixes in some
	of the pragma c_code which did not comply with our coding
	standards (to do with type casting).

samples/cat.m:
samples/sort.m:
	Use io__read_line_as_string.

tests/general/Mmakefile:
tests/general/read_line_as_string.exp:
tests/general/read_line_as_string.m:
	Test case for io__read_line_as_string.

NEWS:
	Mention the above change.
1998-09-09 06:05:30 +00:00
Fergus Henderson
2c4bd735b4 Add comment "This source file is hereby placed in the public domain".
Estimated hours taken: 0.25

samples/*:
	Add comment "This source file is hereby placed in the public domain".
1997-09-10 11:01:12 +00:00
Fergus Henderson
7aaec23181 Add a bunch of new files.
samples/*:
	Add a bunch of new files.
	Remove lots of irrelevant stuff from the Mmake file.
	Add a comment to eliza.m.
1995-05-30 18:35:34 +00:00