avpatil
14th June 2019, 17:28
HI,
In Baan V I am trying to call a Baan V constraint. If the function has function declaration within body then I cannot compile constraint. e.g.

In constaint I have
! #include <itisfcc001>

In functiion itisfc001 if I have say

function tisfc001 () {
}

This will result in compilation error indicating function within function not supported.
I can though use function to define variable that can be used across the constraint without any issue.

avpatil
17th June 2019, 23:21
I think I figured out a way. Instead of defining the function define it as Macro and it will work. In PCF constraint I included a unction like this

!Include <itipcftest01>
!Calculate_Price(Item,Price)

Then created a function tipcftest01 and defined macro
#define Calculate_Price(item,price)
^ if item = X then ##price## = 2
^ else
^ ##price## = 4


I can also call DLL in the marco or write select qeury.
^endiif