I am a novice programmer transitioning from Clipper 5.2d to Harbour. I’ve read the documentation I can find at harbour-project.net. (Why does it seem everything is repeated twice on the documentation I find there?) I have searched this site as well. I would love to find a source like Booth, Lief and Yellick’s reference on Clipper 5.2 which was so helpful to me as I began to learn Clipper. But I gather there is nothing like that for Harbour. I am open to any helpful links offered. I have found Giovanni Di Maria’s reference guides for Hourbour at the elektosoft website as well.
I have tried to figure out what the various EXE’s in the Harbour download are for. Looks like HBRUN.EXE runs a prg file but doesn’t work if there are multiple prg’s involved in a project. True? Any other use for HBRUN?
How about a debugger? (I spend lots of time in CLD.EXE when I’m writing something new and it would help as I rework my prg’s for Harbour.) I’ve experimented with the –b option in HBMK2 but can’t get anything to run like CLD. Tried Alt-D but nothing happens.
Currently I am really stuck on a Base 1001 error: undefined function. I am using HBMK2 with a list of many prg’s in a hbp file: HBMK2 @myproject.hbp I have set harbourcmd=/n /w /a in autoexec.bat I am running Windows XP and working at the command prompt. I got one project to compile and run, but now I am stuck on this second project. I have an editor.prg using memoedit() at its core with Function EFUNC() as the user defined function. EFUNC() is defined in the editor.prg along with 7 other functions. When HBMK2 runs I can see editor.prg complied with “functions/procedures 9” but I get the error at runtime when the program calls editor.prg and cannot find EFUNC(). I tried cutting EFUNC() out of the editor.prg and listing it separately in the hbp file but I get the same error. What am I doing wrong?
By the way, what is the difference between a hbp and hbm file? If I am using HBMK2 as noted above, should it be hbm rather than an hbp file? (These are the kinds of details I would like to find documentation for.)
Thanks for whatever help you can give.
"hardy" <hardyha...@gmail.com> pisze:
I am a novice programmer transitioning from Clipper 5.2d to Harbour. I’ve read the documentation I can find at harbour-
[...]
Currently I am really stuck on a Base 1001 error: undefined function. I am using HBMK2 with a list of many prg’s in a hbp file: HBMK2 @myproject.hbp I have set harbourcmd=/n /w /a in autoexec.bat I am running Windows XP and working at the command prompt. I got one project to compile and run, but now I am stuck on this second project. I have an editor.prg using memoedit() at its core with Function EFUNC() as the user defined function. EFUNC() is defined in the editor.prg along with 7
Request EFUNC //??
Regards,
Marek Horodyski
Currently I am really stuck on a Base 1001 error: undefined function. I am using HBMK2 with a list of many prg’s in a hbp file: HBMK2 @myproject.hbp I have set harbourcmd=/n /w /a in autoexec.bat I am running Windows XP and working at the command prompt. I got one project to compile and run, but now I am stuck on this second project. I have an editor.prg using memoedit() at its core with Function EFUNC() as the user defined function. EFUNC() is defined in the editor.prg along with 7 other functions. When HBMK2 runs I can see editor.prg complied with “functions/procedures 9” but I get the error at runtime when the program calls editor.prg and cannot find EFUNC(). I tried cutting EFUNC() out of the editor.prg and listing it separately in the hbp file but I get the same error. What am I doing wrong?
Juan—
I was looking at HBMK2 –HELP near the end under “Notes:”
<script> can be:
<@script> or <script.hbm>: command line options in file
<script.hbp>: command line options in file, it also marks a new target if specified on the command line
You are right: @myfile.hbp is not listed but it does seem to work with or without the @. I find it does not work without the extension, whether I name the file hbp or hbm. And either way I got the same error at runtime.
Marek—
I’m not sure what your mean. Are you asking to see my code in EFUNC() ?
Regardless I worked some more and got it fixed. The editor.prg parameters are handled by this code:
IF EMPTY(IUSER)
TUSER = "EFUNC()"
ELSE
TUSER = IUSER
ENDIF
..........
This is the memoedit call that comes later:
THEFILE = MEMOEDIT(THEFILE,TTOP,TLEFT,TBOT,TRIGHT,.T.,TUSER,TRIGHT-TLEFT,TTAB,TR,TC,NWR,NWC)
This has worked fine in Clipper. Tonight I put EFUNC() directly in the memoedit call instead of TUSER and it worked. Maybe it needs a macro in Harbour?
I just tried &TUSER in the memoedit call and worked! So I’m learning. Now I’ve got another error a few lines down so I’ll go work on that one.
I also tried the debugger again tonight. With /b in set harbourcmd and -b for HBMK2 I was able to open the debugger with Alt-D. I figured out how to set the path to find the source code. But is it possible to work in split screen like CLD /S ?
Juan—
I was looking at HBMK2 –HELP near the end under “Notes:”
<script> can be:
<@script> or <script.hbm>: command line options in file
<script.hbp>: command line options in file, it also marks a new target if specified on the command line
You are right: @myfile.hbp is not listed but it does seem to work with or without the @. I find it does not work without the extension, whether I name the file hbp or hbm. And either way I got the same error at runtime.
Thank you both for the clarification of the files. That puts me a little further along down the road!