You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do it is possible to have a isolated function or library that parse the line and return the result?
also in wasm.
f.e.
parse("calc = 5k + 4k");
that return
9 kg
The text was updated successfully, but these errors were encountered:
Yes, as you can see, notecalc-lib is a separate library, so you can include it in your app and feed any string into it. You can find some examples in the benchmark folder (benchmarks were implemented as a binary crate using notecalc as a library, the same way as your wished feature).
Though, the ergonomics are not the best, since the notecalc lib handles text editor and other functionalities as well, also one of the strength of notecalc is being a multilne calculator, referencing other lines in your formula, or calculating averages or sums of many lines.
bbodi
changed the title
libcalc
Providing a REPL / single input single output library functionality ?
Mar 25, 2022
Of course, I saw it.
But inside there are very things and it is difficult to isolate you only the routine that seemed the calculations and generally use it in another context.
Do it is possible to have a isolated function or library that parse the line and return the result?
also in wasm.
f.e.
parse("calc = 5k + 4k");
that return
9 kg
The text was updated successfully, but these errors were encountered: