![]() |
XPRESSO - Expression Evaluator - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Programs (https://qb64phoenix.com/forum/forumdisplay.php?fid=7) +---- Thread: XPRESSO - Expression Evaluator (/showthread.php?tid=956) Pages:
1
2
|
XPRESSO - Expression Evaluator - BSpinoza - 10-10-2022 Some people missed here complete programs, written in QB64..... Here is one: XPRESSO = Expression Evaluator This program evaluates mathematical expressions, e.g. (sin(-9.56 * pi) + 2^1.5) - (0.567e9 + 3 * 1.456^0.5) The expressions may contain the following elements: - Numbers - operators - parentheses (for grouping expressions) - Names (of constants) - function calls The program knows many mathematical functions (all of QB64 and many more), constants and important units. So you can use it as your daily calculator... Please read the build in Help (write "hlp" and press return). This explains a little bit the program... but I think it is self explanatory. For text output (constants, units, help) it uses the notepad in Windows. On Linux it uses Geany. So if you are a Linux user you have to install Geany or change "geany" inside the program code to you favourite text editor. I hope its a usefull application not only for QB64 fans. RE: XPRESSO - Expression Evaluator - bplus - 10-10-2022 Very nice! I had an expression evaluator that I updated to do strings that soon turned into oh Interpreter. It was based on expression evaluator called Fval$ see first post in link. It was a major development for me to finally get strings going along with math. https://qb64forum.alephc.xyz/index.php?topic=3723.0 @BSpinoza does yours do string functions and are you planning an interpreter? I do see you have allot of formula conversions. RE: XPRESSO - Expression Evaluator - Coolman - 10-10-2022 interesting but on my laptop with a 15 inches screen and a resolution of 1920x1080, it is unreadable, it would be necessary to plan to increase the display window... RE: XPRESSO - Expression Evaluator - bplus - 10-10-2022 So far looks like standard QB64 screen 0 for me, could not get clipboard "imp" to work: RE: XPRESSO - Expression Evaluator - bplus - 10-10-2022 Also couldn't get a variable assignment like test = 223 2 * test to work. Variables would be next step here. RE: XPRESSO - Expression Evaluator - Pete - 10-11-2022 I love the the name! Very clever. It reminded me of the time my son was two. He was an early talker. The problem talking at that age is an inability to make certain sounds, correctly. His "tr" would come out as "f." No big deal, until one day you are driving the family in the car with the windows down, and a hook and ladder pulls up along side. The boy recognizes it, and starts yelling, Fire '*'uck! Fire '*'uck!" but I digress. As for word Espresso, well, "ex" and some words starting with "s" started out all as "es." So one day he told me something was "es-pecial" and I told him there was no such word. He told me, "Yes there is dad, it's an es-pression!" Anyway, I wish you luck and hope you stay with the project. Very much needed for advanced calculator routines. Pete RE: XPRESSO - Expression Evaluator - BSpinoza - 10-11-2022 (10-10-2022, 02:34 PM)bplus Wrote: ... could not get clipboard "imp" to work: ... Do'nt give up! You will find this out. Quote:bplus: I will think about that.,, RE: XPRESSO - Expression Evaluator - BSpinoza - 03-27-2023 There is a new version. I have attached it in the first post of this thread. Now its possible to assign own variables... (Greetings to bplus!) Quote:>>> test = 1.5 RE: XPRESSO - Expression Evaluator - bplus - 03-27-2023 Hallo BSpinoza! What's new? RE: XPRESSO - Expression Evaluator - BSpinoza - 03-27-2023 (03-27-2023, 06:39 AM)bplus Wrote: Hallo BSpinoza! What's new? @bplus: As I have written: You can assign a variable now. |