I have got few compilation error when i do domain declaration like below code.. kindly clarify it..
Code: Select all
domains myType = integer;real ; string. %Does it possible to declare domain like this ??? predicates onFileNew : window::menuItemListener. divByZero : (myType, myType). clauses onFileNew(_Source, _MenuTag):- X = 10, Y = 0, divByZero(X, Y). divByZero(X, Y):- try Z= X / Y catch TraceId do vpiCommonDialogs::note("div by zero exception") end try.
Exception 2:TaskWindow\TaskWindow.pro(60,13) error c504: The expression has type '::integer', which is incompatible with the type 'taskWindow::myType'
It is working when i define integer alone in the domain section...TaskWindow\TaskWindow.pro(66,19) error c504: The expression has type '(::real, ::real) -> ::real procedure (i,i)', which is incompatible with the type '(taskWindow::myType, A$) -> R$ procedure (i,i)'
kindly help me to understand why this exception happened and how to fix it...??
George Ananth. S