module Calc: sig
.. end
Mathematical calculator main module
module Eval: Matheval
val _disp_unit : bool Pervasives.ref
must unit lines be displayed ?
type
runmode =
| |
CMD_LINE of string list |
| |
STDIN |
| |
REPLACE |
The calculator can be run in different modes
val _runmode : runmode Pervasives.ref
selected running mode for the program
val _remind : bool Pervasives.ref
When printing a result, remind us of the exression ?
val _remind_newline : bool Pervasives.ref
Insert a newline between reminders and result ?
val _insert_result : bool Pervasives.ref
Insert a small string before the result ?
val _print_unit : bool Pervasives.ref
Print unit lines ?
val eval : string -> string
Mathematical evaluation function
val print_eval : string -> unit
Print the result of an evaluation, with respect to chosen options
val eval_list : string list -> unit
Evaluate a list of expressions, printing results as we go
val eof_str : string
String displayed on stderr when end of file condition is reached when reading from stdin
val eval_stdin : unit -> unit
Evaluate what comes on stdin
val seek_and_replace : string -> string -> string -> string
Look for an enclosed expression in a string, then evaluate this expression and returns the same string, but with the expression replaced by its evaluated value
val eval_stdin_replace : unit -> unit
Evaluate what comes on stdin
val _disp_wel : bool Pervasives.ref
Must the welcome message be displayed?
val disp_welcome : unit -> unit
Display the welcome message
val run : unit -> unit
Run the program according to the selected mode and options
val disp_help : unit -> unit
Display the help page
val eval_file : string -> unit
Process the expressions in a file
val pcml : string list -> unit
Parse the command-line