Execute a Script (pp)

Execute a Script (pp)

Postby Silvio.Falconi » Wed Oct 17, 2018 9: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 November 2023 - January 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
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Execute a Script (pp)

Postby horacio » Thu Oct 18, 2018 4: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
horacio
 
Posts: 1363
Joined: Wed Jun 21, 2006 12:39 am
Location: Capital Federal Argentina

Re: Execute a Script (pp)

Postby horacio » Thu Oct 18, 2018 8:14 pm

And how would it be ?

Saludos
horacio
 
Posts: 1363
Joined: Wed Jun 21, 2006 12:39 am
Location: Capital Federal Argentina

Re: Execute a Script (pp)

Postby Antonio Linares » Fri Oct 19, 2018 3: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Execute a Script (pp)

Postby Antonio Linares » Fri Oct 19, 2018 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Execute a Script (pp)

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Execute a Script (pp)

Postby Silvio.Falconi » Mon Oct 29, 2018 7: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 November 2023 - January 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
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 38 guests