Show/Hide Toolbars

XSharp

Automatically generate Clipper calling convention constructors for classes without constructor

Syntax

-vo16[+|-]

Arguments

+ | - Specifying +, or just -vo16, tells the compiler to automatically generate constructors with the same signature as the constructors of the parent class

To set this compiler option in the Visual Studio development environment:

 

1.Open the project's Properties page.

2.Click the Dialect tab.

3.Change the value.

4.Click here to see the property page

Example

CLASS Event
  EXPORT hWnd   AS PTR
  EXPORT uMsg   AS DWORD
  EXPORT wParam   AS DWORD
  EXPORT lParam   AS LONG
  EXPORT oWindow AS OBJECT

 
CONSTRUCTOR(_hWnd, _uMsg, _wParam, _lParam, _oWindow)
  SELF:hWnd := _hWnd
  SELF:uMsg := _uMsg
  SELF:wParam := _wParam
  SELF:lParam := _lParam
  SELF:oWindow := _oWindow
END CLASS
 
CLASS ControlEvent INHERIT Event
END CLASS

 

In the code above the compiler would generate a constructor for the ControlEvent class. This constructor will pass all the parameters to the constructor of the Event class.

 

The generated constructor would look like:

 

  CONSTRUCTOR(_hWnd, _uMsg, _wParam, _lParam, _oWindow)
    SUPER(_hWnd, _uMsg, _wParam, _lParam, _oWindow)