AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX: За рубежом > DAX in English
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 04.06.2012, 22:03   #1  
Kent is offline
Kent
Участник
 
46 / 10 (1) +
Регистрация: 24.01.2007
evalBuf()
Hi,

To use evalBuf() development permission is needed. Is some other kind of way, to evalute math string expressions? An example, ((5 + 7 -2) \ 6)
Старый 05.06.2012, 08:20   #2  
kornix is offline
kornix
MCP
MCBMSS
Злыдни
Ex AND Project
 
414 / 146 (5) +++++
Регистрация: 24.02.2009
Адрес: Санкт-Петербург
Цитата:
Сообщение от Kent Посмотреть сообщение
Hi,

To use evalBuf() development permission is needed. Is some other kind of way, to evalute math string expressions? An example, ((5 + 7 -2) \ 6)
Hi! You can use runBuf() instead evalBuf function.
runbuf("Х1>Х2 ? 23/Х1 : Х2*3", X1, X2);
Старый 05.06.2012, 08:24   #3  
S.Kuskov is offline
S.Kuskov
Участник
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
 
3,429 / 1772 (66) ++++++++
Регистрация: 28.04.2007
Адрес: Калуга
evalBuf, runBuf and xppCompiller have access to system functions, not only to mathematical calculations. Therefore, they require enhanced privileges

Solutions:
1. Use runAs() function to temporarily receive enhanced privileges.
2. Use external library or stored procedure
3. Write your own parser
4. RealEdit and IntEdit controls have native support of the calculation simple expression. Type this string "(5+7-2)/6" (without quotes) in the input field of these controls

Последний раз редактировалось S.Kuskov; 05.06.2012 в 08:26.
Старый 05.06.2012, 14:58   #4  
Kent is offline
Kent
Участник
 
46 / 10 (1) +
Регистрация: 24.01.2007
Thanks.

Acctualy if evalBuf() is usded in code to calculate given expression it works very well also without development privilegies.
 


Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 23:37.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.