large class divided into n prg : itis possible ?

Post Reply
User avatar
Silvio.Falconi
Posts: 7348
Joined: Thu Oct 18, 2012 7:17 pm

large class divided into n prg : itis possible ?

Post by Silvio.Falconi »

I have a class big like xbrowse.
Is it possible to create three or four different files and put the methods of the same class?

Can methods of the same class be implemented in different PRG files?

For example:

TFiveXL.prg
CLASS TFiveXL
METHOD Paint()
METHOD DrawGrid()
METHOD ConfirmFormula()
ENDCLASS

TFiveXL_Formula.prg
METHOD ConfirmFormula() CLASS TFiveXL

TFiveXL_IO.prg
METHOD SaveSheet() CLASS TFiveXL

Is this a recommended practice in Harbour/FiveWin projects?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
cnavarro
Posts: 6763
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: large class divided into n prg : itis possible ?

Post by cnavarro »

Try

MICLASS01.PRG

CLASS ....

ENDCLASS

METHOD New() CLAS ....

Return Self

#include "MICLASS02.PRG"

Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
Silvio.Falconi
Posts: 7348
Joined: Thu Oct 18, 2012 7:17 pm

Re: large class divided into n prg : itis possible ?

Post by Silvio.Falconi »

cnavarro wrote: Wed Jun 03, 2026 10:45 pm

Try

MICLASS01.PRG

CLASS ....

ENDCLASS

METHOD New() CLAS ....

Return Self

#include "MICLASS02.PRG"

I had thought instead of creating several different files
and then attaching them during compilation.

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Post Reply