Commit Graph

8 Commits

Author SHA1 Message Date
Julien Fischer
86825c0e0e Fix compilation of samples/expand_terms.
samples/expand_terms.m:
     Replace calls to the now deleted term_io.read_term/3.
2022-03-06 02:30:24 +11:00
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
Julien Fischer
fa555e1b36 Use '.' as the module qualifier instead of '__'.
Estimatd hours taken: 0.5
Branches: main

samples/*.m:
	Use '.' as the module qualifier instead of '__'.

	Use the new foreign language interface.

	Fix minor formatting issues.

	Use state variables for passing the I/O state.
2006-03-21 00:51:03 +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
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
c50b78c6b2 A new example, showing how to emulate Prolog's expand_term.
Estimated hours taken: 1

samples/expand_terms:
	A new example, showing how to emulate Prolog's expand_term.
1996-07-25 17:09:47 +00:00