Page 1 of 1

[Implemented] Interfaces: Array and List not working

Posted: Fri Sep 07, 2012 11:49 am
by Danilo
Both give error: "Syntax error in the procedure arguments"

Code: Select all

Interface test_interface_array
    test_func.l( Array x.l(1) )
EndInterface

Code: Select all

Interface test_interface_list
    test_func.l( List x.s() )
EndInterface
Please allow it, so we can give PB-Arrays and PB-Lists to PB-Interface-Functions.


My procedure for the Interface compile OK:

Code: Select all

; extern
Procedure CDrawArea_polygon(*i,*data1,len.i,*data2,len2.i,col.l,fill.l)
EndProcedure
Procedure CDrawArea_polygon2(*i,*data1,len.i,*data2,len2.i,col.l,fill.l)
EndProcedure

; PB
Structure sDrawArea
    DrawArea_ptr.i
EndStructure

Procedure _DrawArea_polygonArrayLong(*this.sDrawArea, Array x.l(1), Array y.l(1), edgeColor.l, fillColor.l)
     CDrawArea_polygon2(*this\DrawArea_ptr, @x(), ArraySize(x()), @y(), ArraySize(y()), edgeColor, fillColor)
EndProcedure

Procedure _DrawArea_polygonArrayDouble(*this.sDrawArea, Array x.d(1), Array y.d(1), edgeColor.l, fillColor.l)
     CDrawArea_polygon(*this\DrawArea_ptr, @x(), ArraySize(x()), @y(), ArraySize(y()), edgeColor, fillColor)
EndProcedure
It works! The only problem is the Interface check:

Code: Select all

Interface DrawArea
    polygonArrayLong(Array x.l(1), Array y.l(1), edgeColor.l, fillColor.l)
    polygonArrayDouble(Array x.d(1), Array y.d(1), edgeColor.l, fillColor.l)
EndInterface