Показать сообщение отдельно
Старый 26.11.2003, 20:45   #11  
Maxim Gorbunov is offline
Maxim Gorbunov
Administrator
Соотечественники
Лучший по профессии 2009
 
2,483 / 646 (26) +++++++
Регистрация: 27.11.2001
Адрес: Dubai, UAE
Если дословно, то так.

PHP код:
Cmd _
"void Func(DataAreaId c, int x) \n" _
"{                             \n" _
"    StdAxObject obj;           \n" _
";                              \n" _
"    changecompany (c) { \n" _
"        return obj.getSomeValue(x) + sin(x); \n" _
"    } \n" _
"}"
Ax.ExecuteStmt "runbuf(\"" Cmd +"\", 'DAT', 1)" 
Только вот значения возвращаемые так забрать не получится.

А вот чтобы забирать значения, надо сделать так:
PHP код:
Common.CreateRecord("Common")
Cmd _
"void Func(DataAreaId c, int x, Common ret) \n" _
"{                             \n" _
"    StdAxObject obj;           \n" _
";                              \n" _
"    changecompany (c) { \n" _
"        ret.RecId=obj.getSomeValue(x) + sin(x); \n" _
"    } \n" _
"}"
Common.ExecuteStmt "runbuf(\"" Cmd "\", 'DAT', 1, %1)" 
Разумеется, работает только для целых чисел. Результат в Common.RecId.
__________________
Not registered yet? Register here!
Have comments, questions, suggestions or anything else regarding our web site? Don't hesitate, send them to me