Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2003.01.09;
Скачать: [xml.tar.bz2];

Вниз

Калькулятор для выражений с функциями и переменными???   Найти похожие ветки 

 
Alexsys   (2002-12-25 07:47) [0]

Вот такая проблемка: мне надо сделать что-то типа калькулятора, который будет считать выражения с различными функциями, скобками и т.д. В качестве аргументов будут подставляться переменные.
Например:
INT(SIN($A)+($B/25+COS($C*125))/$D) - функция
$A, $B, $C, $D – переменные

Никто не сталкивался, как бы это прописать? Может есть готовые наброски какие-нибудь? Или хотя-бы идейку подкиньте. Помогите, кто сможет…


 
Alexsys   (2002-12-25 08:22) [1]

Люди! Горю! Киньте мыслишку, как мне разобрать это выражение?


 
Дмитрий К.К.   (2002-12-25 08:27) [2]

Библиотека RX.

TRxMathParser object

Description

A math formula parser and evaluator.

Yo can get a formula result in calling directly GetFormulaValue function


The TRxMathParser is a class for parsing and evaluating simple mathematical expressions specified at run-time. The programming interface is simple: specify expression to be evaluated in AFormula parameter of Exec method, call Exec and retrieve computed value as result of Exec method.

When calculating error occured the ERxParserError exception is raised.



Accepted operators:

+ , - , * , /

The following functions are supported; it doesn"t matter if you use lower or upper case:
Arctan, Cos, Sin, Tan, Abs, Exp, Ln, Log, Sqrt, Sqr, Int, Fraq.


 
Alexsys   (2002-12-25 08:33) [3]

Щас посмотрю. Спасибо огромное! Выручил.


 
Дмитрий К.К.   (2002-12-25 08:36) [4]

Да не за фто ;)


 
Дмитрий К.К.   (2002-12-25 08:37) [5]

Оттуда же:

TRxCalculator component

Description

Rx Calculator is a floating point calculator designed to do simple operations. It is an invisible component, or one that pops-up upon operation.



Use the Execute method to popup the Calculator. If any errors occur on calculators, use the BeepsOnError to control beeping on errors If you prefer the classical white calculator, set the Clt3d to false.


 
Alexsys   (2002-12-26 07:35) [6]

Мне больше подошла GetFormulaValue оттуда же. Спасибо еще раз.



Страницы: 1 вся ветка

Форум: "Основная";
Текущий архив: 2003.01.09;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.007 c
4-25133
pavelB
2002-11-20 15:44
2003.01.09
мои документы


14-25074
MsGuns
2002-12-20 16:58
2003.01.09
ГДЕ МОИ НОСКИ ?


14-25080
The_Vizit0r
2002-12-21 22:23
2003.01.09
Помогите найти прогу


1-24882
idpro
2002-12-25 16:03
2003.01.09
Отключение темы WIndows XP для своего приложения


14-25026
SV
2002-12-20 00:35
2003.01.09
Dot Net





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский