Page 1 of 1

LIST parameter without type

Posted: Mon Jul 27, 2009 8:11 am
by horst
The list paramter requires the (data) type, for example

Code: Select all

Procedure ListOperation(List Dummy.type(), parm2, parm3) 
However, a programmer might want to write a procedure where the data part (and the structure, type) are not used at all (only functions like NextElement(), SwapElement() etc.). Therefor it should be possible to omit the type in the procedure definition.

This would be very usefull for a sort procedure (that uses a callback for data comparison), or for a function to move a sequence of list elements.

The compiler could still produce an error, when an attempt is made to use the element's data.