How does mod harbour work

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!
Post Reply
User avatar
Ruth
Posts: 172
Joined: Fri Dec 07, 2007 1:26 pm
Contact:

Re: How does mod harbour work

Post by Ruth »

Dear friends,

I use

Code: Select all | Expand

ENDTEXT
? "test1"
? "test2"
TEMPLATE
 
which works fine...

but would prefer something like this in some situations...

Code: Select all | Expand

<?prg
? "test3"
?>
do I need to escape the "?" in this context, because the code-example doesnt seem to work.

what is working

Code: Select all | Expand

<?prg
return "test4"
?>
but not multiline

Code: Select all | Expand

<?prg
return "test4"
return "test5"
?>
Thank you a lot in advance and kind regards
Ruth
User avatar
Ruth
Posts: 172
Joined: Fri Dec 07, 2007 1:26 pm
Contact:

Re: How does mod harbour work

Post by Ruth »

Dear team,


I kindly want to ask another question about "How does mod harbour work".
On some occasions I get very useful error messages - like for example
Error: LOCAL declaration follows executable statement
operation: line:593
called from: HB_COMPILEFROMBUF, line: 0
called from: ..\source\exec.prg, EXECUTE, line: 68

Source:
0066: cPRGPATH := hb_GetEnv( "PRGPATH" )
0067: cPRGPATH := STRTRAN( cPRGPATH , "/", "\" )
0068 =>cdbf_BLOG := cPRGPATH+ "\data\BLOG.DBF"
0069: lRecord := .T.
0070:
but I make a lot of other mistakes too, where I don´t "see" the error right away ... like for example trying to return a numeric value

Code: Select all | Expand

<?prg return hWarenkorb["Variante2"]["Zimmer1"]["Subtotal"] ?>
could I set up some error messages somewhere for my common mistakes? so that the programm "tells" me "Error: STR() missing for numeric value..."


thanks again for your attention and kind regards
ruth
User avatar
Antonio Linares
Site Admin
Posts: 42273
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How does mod harbour work

Post by Antonio Linares »

Ruth wrote:Dear friends,

I use

Code: Select all | Expand

ENDTEXT
? "test1"
? "test2"
TEMPLATE
 
which works fine...

but would prefer something like this in some situations...

Code: Select all | Expand

<?prg
? "test3"
?>
do I need to escape the "?" in this context, because the code-example doesnt seem to work.

what is working

Code: Select all | Expand

<?prg
return "test4"
?>
but not multiline

Code: Select all | Expand

<?prg
return "test4"
return "test5"
?>
Thank you a lot in advance and kind regards
Ruth
Dear Ruth,

Instead of doing:

Code: Select all | Expand

<?prg
? "test3"
?>
use:

Code: Select all | Expand

<?prg
AP_RPUTS( "test3" )
?>
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42273
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: How does mod harbour work

Post by Antonio Linares »

Ruth wrote:Dear team,


I kindly want to ask another question about "How does mod harbour work".
On some occasions I get very useful error messages - like for example
Error: LOCAL declaration follows executable statement
operation: line:593
called from: HB_COMPILEFROMBUF, line: 0
called from: ..\source\exec.prg, EXECUTE, line: 68

Source:
0066: cPRGPATH := hb_GetEnv( "PRGPATH" )
0067: cPRGPATH := STRTRAN( cPRGPATH , "/", "\" )
0068 =>cdbf_BLOG := cPRGPATH+ "\data\BLOG.DBF"
0069: lRecord := .T.
0070:
but I make a lot of other mistakes too, where I don´t "see" the error right away ... like for example trying to return a numeric value

Code: Select all | Expand

<?prg return hWarenkorb["Variante2"]["Zimmer1"]["Subtotal"] ?>
could I set up some error messages somewhere for my common mistakes? so that the programm "tells" me "Error: STR() missing for numeric value..."


thanks again for your attention and kind regards
ruth
Dear Ruth,

mod_harbour errors handling sometimes is not very usefull, I agree with you.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Ruth
Posts: 172
Joined: Fri Dec 07, 2007 1:26 pm
Contact:

Re: How does mod harbour work

Post by Ruth »

dear antonio, thank you very much for your answers and your kind help. kind regards and have a nice day ruth
Post Reply