Repository navigation
v0.7.0
Classes, methods, interfaces and namespaces: function block methods, classes, single inheritance with dynamic binding, interfaces with assignment attempt, references to instances, namespaces and a sorting conveyor example. Contains breaking changes: 20 new reserved words; see Changed.
Added
-
Sorting conveyor reference project combining namespaced classes, inheritance,
interface-array dispatch, an instance reference and function block methods with
retained bin totals. Includes sensor buttons, diverter lamps, numeric displays,
a virtual-clock conformance trace and a browser acceptance test. -
Namespaces for data types, POUs, classes and interfaces, qualified names and
USING imports with ordered lexical lookup and ambiguity diagnostics. INTERNAL
declarations, members and methods respect namespace boundaries. Project files
preserve exact namespace sources and exchange qualified names; source lists and
monitor types display qualified names. Structure fields keep their independent
member names, including names shared with visible types. -
References to user function block and class instances (
REF_TO Motor,REF(inst)
andREF(THIS)). Dereferences support member access, dynamic method calls and
function block body calls. Derived references assign to base references;?=
casts between instance references and interfaces, clearing mismatches to NULL.
Instance targets appear as monitor paths and survive project save/reopen. -
Interfaces with method prototypes, multiple interface inheritance and IMPLEMENTS
for classes and function blocks. Interface variables bind persistent instances,
dispatch methods dynamically, compare identities and support assignment attempt
(?=), which clears the target on mismatch. Monitor targets as paths or NULL;
add interface sources from a template and preserve them in project files.
PROGRAM interface in-outs bind exact-type mutable globals through configuration
connections and share their storage immediately; unbound in-outs are rejected. -
Single inheritance for function blocks and classes with EXTENDS, dynamic method
overrides, SUPER method/body calls, ABSTRACT and FINAL. Inherited members retain
their initializers and retention qualifiers and appear base first in the monitor.
Project files preserve exact inheritance sources; TC6 elements contain only each
type's own variables. Faults identify the source declaring the inherited code. -
Classes with persistent members, methods and THIS, instance arrays and globals,
access checks and RETAIN/NON_RETAIN restart behavior. Add a class from the source
list and monitor, write or force its members regardless of access. Project files
keep exact class sources; other TC6 tools see empty function blocks. -
ADR 0017 documents the accepted design for methods, classes, inheritance,
interfaces, references to instances and namespaces for Milestone 7. -
Function block methods with instance storage, fresh call-local variables,
formal and positional parameters, return values, access specifiers and THIS.
Method calls show inline values in PROGRAM bodies; monitor access stays unrestricted.
Project files preserve exact methods and access in the source extension.
THIS-qualified member instances and indexed elements support body calls, and
their bounds faults identify the member array in the instance path.
Changed
- INTERFACE, END_INTERFACE, IMPLEMENTS, CLASS, END_CLASS, EXTENDS, OVERRIDE, SUPER,
ABSTRACT, FINAL, METHOD, END_METHOD, THIS, PUBLIC, PROTECTED, PRIVATE, INTERNAL,
NAMESPACE, END_NAMESPACE and USING are now reserved. Texts in 0.6.0 project files
that use them as names open as editable drafts, from the preserved source text or,
when it is absent, from text generated from the standard elements. Autosave keeps
drafts; rename the identifiers before running or exporting the project.