fn_express 1.1.3 copy "fn_express: ^1.1.3" to clipboard
fn_express: ^1.1.3 copied to clipboard

A Dart package for parsing and evaluating mathematical expressions with support for variables, functions, and constants.

example/fn_express_example.dart

import 'dart:io';

import 'package:fn_express/fn_express.dart';

void main() {
  var isRunning = true;

  final repl = Repl(
    (output, {newline = true}) =>
        newline ? stdout.writeln(output) : stdout.write(output),
  );

  while (isRunning) {
    stdout.write('>> ');
    final input = stdin.readLineSync();

    (input == null || input.toLowerCase() == 'exit')
        ? isRunning = false
        : repl(input);
  }
}
0
likes
160
points
136
downloads

Publisher

verified publisherlgsim.io

Weekly Downloads

A Dart package for parsing and evaluating mathematical expressions with support for variables, functions, and constants.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on fn_express