FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Execute a Script (pp)
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Execute a Script (pp)
Posted: Wed Oct 17, 2018 09:30 AM

In an application of a famous person in our group I could notice that there is the possibility to load scripts (prg) and have them run without having Harbour

we must make

oHrb = HB_CompileFromBuf( cCode, "-n", "-Ic:\fwh\include", "-Ic:\harbour\include" )

I have searched in this forum and I have found only examples where the call to Harbour and the include folder are needed, so for these examples I have found you must also insert a folder with Harbour.exe

On that application not only is there no harbour, nor is there any reference to the folder, but it seems that all the functions of Harbor / fivewin and of course the personal ones are included

How is this possible?

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
Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Re: Execute a Script (pp)
Posted: Thu Oct 18, 2018 04:58 PM

Think you have the wrong concept. Through the function that you post and from a harbor program you can execute a prg. external without compiling.

Saludos

Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Re: Execute a Script (pp)
Posted: Thu Oct 18, 2018 08:14 PM

And how would it be ?

Saludos

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Execute a Script (pp)
Posted: Fri Oct 19, 2018 03:54 AM
Silvio,

Please notice that the second parameter must be .T. in order to catch the compiler runtime errors:

oHrb = HB_CompileFromBuf( cCode, .T., "-n", "-Ic:\fwh\include", "-Ic:\harbour\include" )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Execute a Script (pp)
Posted: Fri Oct 19, 2018 04:12 AM

Silvio,

In your PRG use this:

REQUEST __pp_StdRules

that should provide you all Harbour rules

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Execute a Script (pp)
Posted: Fri Oct 19, 2018 10:33 AM

Silvio,

When Harbour is created, pptable.c is created from hbstdgen.ch. The rule to build it is in src/pp/Makefile.

The same way, we can create a C file for FiveWin.ch or any other .ch file using hbpp.exe:

hbpp.exe yourfile.ch -o yourfile.c

This will avoid the need to use an external .ch file and most important, it will load it extremelly fast :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Execute a Script (pp)
Posted: Mon Oct 29, 2018 07:50 AM

Antonio,
I saw Fwdbu
How work the script process on fwdbu ?

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

Continue the discussion