Incorporate these files into Icon programs using the $include
preprocessor macro.
This should be easier than translating to ucode and linking.
Working examples, named test_*.icn
, are in the tests
directory.
cd tests; icon runt.icn
will run them all and compare the results to the *.std
captures of their expected output.
Use icon runt.icn --help
to see options.
Procedures to produce logical lines or fields from formatted data files.
- Record holding two co-expression factories
lines
=== tabularLines | iniLinesfields
=== tabularFields | iniFields
- Produce a
FieldedData
record forfilePath
corresponding to format. format == ("tabular" | "ini")
- Factory for a co-expression producing logical lines of a tabular file
f
.
- Factory for a co-expression producing fields from a logical line of a tabular file:
line
is a logical line produced bytabularLines
.sep
is the field separator; if omitted or &null, TAB is used.
- Factory for a co-expression producing logical lines of an INI file
f
.
- Factory for a co-expression producing fields from a logical line of an INI file
line
is a logical line produced byiniLines
.
- Parse an INI file at path
ini
into a table of tables
Procedures to manipulate files, directores, and their paths.
- Produce fn, substituting new_ex for old_ex
- Produce name(s) that name a directory
Procedures to transform data structures into includable Icon declarations and statements
- Produce Icon code to reproduce value
x
, if possible
- Write Icon code to reproduce values in list
x
tof
if it is a file; otherwise to&errout
andf
is discarded.
Procedure to produce records from a list of records, matching specified criteria.
- Select matching records (or tables)
X
- from list
Lfrom
- where
X[sField] @ Ctest
succeeds
- from list
Procedure to produce a value that can be read globally but can be reset only by the co-expression that set it it initially.
- Set a globally visibe read-only value
- which is resettable by the C that creates it.
Procedures to suspend lists combining sequences.
- Suspend lists combining infinite sequences. LiP:
- evaluates in a "breadth first" manner to ensure that all values of finite sequences will eventually be produced even when some sequences are infinite.
- uses memoization to avert the need to evaluate each sequence more than once.
- uses wora(LiP) to determine whether to use LiFiniteP (the default) or nAltP to combine memoized results.
- requires that
wora.icn
be previously included, for wora(id)
- Recursively suspend lists combining finite seqs;
- does not enforce "breadth first" evaluation.
- Recurrently suspend lists combining finite seqs;
- does not enforce "breadth first" evaluation.