version 1.31, 2025/04/19 01:05:56
|
version 1.34, 2025/04/28 14:52:54
|
Line 4
|
Line 4
|
@settitle The FreeM Manual |
@settitle The FreeM Manual |
|
|
@copying |
@copying |
This manual is for FreeM, (version 0.64.0-rc0), which is a free and open-source implementation of the M programming language. |
This manual is for FreeM, (version 0.64.0-rc1), which is a free and open-source implementation of the M programming language. |
|
|
|
|
Copyright @copyright{} 2014-2025 Coherent Logic Development LLC |
Copyright @copyright{} 2014-2025 Coherent Logic Development LLC |
Line 18 Permission is granted to copy, distribut
|
Line 18 Permission is granted to copy, distribut
|
|
|
@title The FreeM Manual |
@title The FreeM Manual |
@subtitle @sc{The Official Manual of FreeM} |
@subtitle @sc{The Official Manual of FreeM} |
@subtitle Version 0.64.0-rc0 |
@subtitle Version 0.64.0-rc1 |
@c@vskip 10pt |
@c@vskip 10pt |
@c@center @image{freem-logo-sm,,,,.png} |
@c@center @image{freem-logo-sm,,,,.png} |
@author Serena Willis |
@author Serena Willis |
Line 370 Attempting to start a FreeM interpreter
|
Line 370 Attempting to start a FreeM interpreter
|
The FreeM direct-mode environment is the mode entered when FreeM is invoked without the use of @option{-r @emph{<entryref>}} or @option{--routine=@emph{<entryref>}}: |
The FreeM direct-mode environment is the mode entered when FreeM is invoked without the use of @option{-r @emph{<entryref>}} or @option{--routine=@emph{<entryref>}}: |
|
|
@example |
@example |
Coherent Logic Development FreeM version 0.64.0-rc0 (x86_64-pc-linux-gnu) |
Coherent Logic Development FreeM version 0.64.0-rc1 (x86_64-pc-linux-gnu) |
Copyright (C) 2014, 2020, 2021 Coherent Logic Development LLC |
Copyright (C) 2014, 2020, 2021 Coherent Logic Development LLC |
|
|
|
|
Line 2514 In the above @emph{inclusive} form, @cod
|
Line 2514 In the above @emph{inclusive} form, @cod
|
@cartouche |
@cartouche |
@quotation |
@quotation |
@emph{Note} |
@emph{Note} |
The below @emph{argumentless} and @emph{exclusive} forms of @code{KSUBSCRIPTS} are not implemented in FreeM, as of version 0.64.0-rc0, but are planned for a future release. |
The below @emph{argumentless} and @emph{exclusive} forms of @code{KSUBSCRIPTS} are not implemented in FreeM, as of version 0.64.0-rc1, but are planned for a future release. |
@end quotation |
@end quotation |
@end cartouche |
@end cartouche |
|
|
Line 2549 In the above @emph{inclusive} form, @cod
|
Line 2549 In the above @emph{inclusive} form, @cod
|
@cartouche |
@cartouche |
@quotation |
@quotation |
@emph{Note} |
@emph{Note} |
The below @emph{argumentless} and @emph{exclusive} forms of @code{KVALUE} are not implemented in FreeM, as of version 0.64.0-rc0, but are planned for a future release. |
The below @emph{argumentless} and @emph{exclusive} forms of @code{KVALUE} are not implemented in FreeM, as of version 0.64.0-rc1, but are planned for a future release. |
@end quotation |
@end quotation |
@end cartouche |
@end cartouche |
|
|
Line 4427 See @ref{Classes}.
|
Line 4427 See @ref{Classes}.
|
@cindex variables, global |
@cindex variables, global |
@cindex data |
@cindex data |
|
|
|
@menu |
|
* Globals Overview:: Basics of FreeM persistent storage. |
|
* Creating Globals:: How to create globals. |
|
* Removing Globals:: How to remove globals. |
|
* Global Storage:: How globals are stored. |
|
@end menu |
|
|
|
@node Globals Overview |
|
@section Globals Overview |
|
|
FreeM supports typical M globals, which are often described as persistent, hierachical sparse arrays. Globals make it relatively simple to include persistent data in an application without requiring the developer to use an external database management system, and offer syntax and semantics so similar to M local variables and structured system variables that moving from one to the other is seamless. |
FreeM supports typical M globals, which are often described as persistent, hierachical sparse arrays. Globals make it relatively simple to include persistent data in an application without requiring the developer to use an external database management system, and offer syntax and semantics so similar to M local variables and structured system variables that moving from one to the other is seamless. |
|
|
Each global comprises three elements: |
Each global comprises three elements: |
Line 4507 typedef struct global_header {
|
Line 4517 typedef struct global_header {
|
@cindex locking |
@cindex locking |
@cindex transaction processing |
@cindex transaction processing |
|
|
Multitasking, multi-user FreeM applications must concern themselves with concurrent access to globals in order to maintain logical consistency and prevent concurrent writes from interleaving. |
@menu |
|
* Concurrency Control Overview:: Basics of concurrency control. |
|
* Advisory Locks:: Coordinating access voluntarily. |
|
* Transaction Processing:: Ensuring logical consistency. |
|
@end menu |
|
|
|
@node Concurrency Control Overview |
|
@section Concurrency Control Overview |
|
|
|
Multitasking, multi-user FreeM applications must concern themselves with conscientious management of concurrent access to globals in order to maintain logical consistency and prevent concurrent reads and writes from conflicting with each other. |
|
|
In FreeM, there are two mechanisms provided for managing concurrent global access: advisory locks, and transaction processing. |
In FreeM, there are two mechanisms provided for managing concurrent global access: @emph{advisory locks}, and @emph{transaction processing}. |
|
|
|
Advisory locks allow applications to voluntarily coordinate concurrent access to globals with the @code{LOCK} command, and require each application to check the @code{LOCK} status prior to accessing a global. |
|
|
|
Transaction processing allows applications to delineate sets of global operations (sets, kills, etc.) as being part of a transaction, in which no operations are performed against the globals contained within the transaction until the transaction is committed. In addition, processes other than the one running the transaction will be forced to wait to access globals for either the duration of the commit phase (@emph{batch mode}), or for the entire duration of the transaction (@emph{serial mode}). |
|
|
|
@node Advisory Locks |
|
@section Advisory Locks |
|
|
@node Transaction Processing |
@node Transaction Processing |
@section Transaction Processing |
@section Transaction Processing |
Line 4652 The effect of this is that the operation
|
Line 4678 The effect of this is that the operation
|
@node Classes |
@node Classes |
@section Classes |
@section Classes |
|
|
|
@menu |
|
* Class Overview:: Class basics. |
|
* Constructors:: Managing object creation. |
|
* Destructors:: Cleaning up. |
|
* Runtime Polymorphism:: Selecting methods at runtime. |
|
@end menu |
|
|
|
@node Class Overview |
|
@subsection Class Overview |
|
|
A @emph{class} is the primary organizing concept of FreeM support for object-oriented programming, and in FreeM, is simply an M routine with a few special properties: |
A @emph{class} is the primary organizing concept of FreeM support for object-oriented programming, and in FreeM, is simply an M routine with a few special properties: |
|
|
@example |
@example |