Foxbase to Harbour

96 views
Skip to first unread message

Keith Williams

unread,
Oct 26, 2010, 5:02:16 AM10/26/10
to harbou...@googlegroups.com
Hi there,

I am hoping that there is someone out there that can help me with a
unique problem. I am beginner to the Harbour language, and I would like
and try to rewrite a old foxbase application using Harbour.

My problem is that I don't understand the old foxbase language and can't
figure out how to rewrite it into Harbour. I can see the similarity so I
think this is possible. If there is anyone out there that can take a
look at the start.prg file attached that might be able to understand and
help me rewrite that into Harbour, then I am sure I will be able to use
it as example and the documentation for Harbour and Clipper and
understand it to rewrite the rest of the program.

Any help will be greatly appreciated!

On a different note. I noticed that the default harbour.spec with the
source does not build on Fedora 13. I have fixed this up and built rpm's
for Fedora 13 for anyone interested.

Thank you and regards,

Keith
ke...@blue-hat.co.za

start.prg

Massimo Belgrano

unread,
Oct 26, 2010, 7:31:36 AM10/26/10
to harbou...@googlegroups.com
He Keith

You can start creating a project file
------create start.hbp
/n2
start.prg
---------------------------
compile win hbmk2 start.hbp
and you can see that you not have many error 
add at top of your source
#include "hbfoxpro.ch"

i suggest start hbide to 
modify save and run (f9) your source
to see interactive any modification 
if you doble click on red error you go to your source


hbide.jpg
2010/10/26 Keith Williams <ke...@blue-hat.co.za>

-
--
Massimo Belgrano

hbide.jpg

Qatan

unread,
Oct 26, 2010, 8:29:56 AM10/26/10
to harbou...@googlegroups.com
Hello Keith,

What you are asking is not just a simple help.
I looked your code and it is missing many dependencies (external
programs ->PRGs) and files such as databases.
Also there is some sintaxes that are different from the ones of Cl*pper
standards.
Harbour is compatible with Cl*pper 5.2 e 5.3 and can do many things that
are special for Foxpro, Flagship, Clip, xHarbour, xBase++ and so... but not
for Foxbase. It would require not just some few adjustments but a bit more
(or bytes more...).
For such a task I would recomend you to contract an experienced
programmer to do the conversion of the whole system (with all the
dependencies and files) unless you have time to study and try Harbour by
yourself but it depends of what is more important for you right now.
Where were you using that system? Under Linux or Windows?
I hope that information gives you some guidance and help.
Regards,

Qatan

> --
> You received this message because you are subscribed to the Google
> Groups "Harbour Users" group.
> Unsubscribe: harbour-user...@googlegroups.com
> Web: http://groups.google.com/group/harbour-users
>

Keith Williams

unread,
Oct 26, 2010, 7:36:13 AM10/26/10
to harbou...@googlegroups.com
Massimo,

I thank you, that is a start for me. Thanks so much!

Best,

Keith


-----Original Message-----
From: Massimo Belgrano <mbel...@deltain.it>
Reply-to: harbou...@googlegroups.com
To: harbou...@googlegroups.com
Subject: Re: [harbour-users] Foxbase to Harbour
Date: Tue, 26 Oct 2010 13:31:36 +0200

He Keith


You can start creating a project file
------create start.hbp
/n2
start.prg
---------------------------
compile win hbmk2 start.hbp
and you can see that you not have many error
add at top of your source
#include "hbfoxpro.ch"


i suggest start hbide to
modify save and run (f9) your source
to see interactive any modification
if you doble click on red error you go to your source

--

Massimo Belgrano

unread,
Oct 26, 2010, 12:07:23 PM10/26/10
to harbou...@googlegroups.com
How much Kb are all your *.prg?

2010/10/26 Keith Williams <ke...@blue-hat.co.za>

Massimo,

I thank you, that is a start for me. Thanks so much!

Best,

Keith


--
Massimo Belgrano

Keith Williams

unread,
Oct 27, 2010, 3:24:32 AM10/27/10
to harbou...@googlegroups.com
Hi Massimo,

The prg's total 972.6 KB. This is a program from a very old SCO Unix
system, so most (+/- 30%) of that only deals with the menu's and input
screens, because of the 80column display limitation of the old
terminals.

Anyhow, after doing what you suggested it started becoming clear! You
see I could not understand for example what this meant:

PROGRAM=PROGRAM
COMPANY=COMPANY
P2TODAY=P2TODAY

Until I realised that it's actually variables assigned out of a DBF that
has column names assigned to variables from the same name! Duh!

Anyhow, so after managing that I was able to assign the variables
correctly and the errors started to disappear! I am rewriting the input
screens to take advantage of the size of new terminals, so less menus
and more fields on the input screens! ;-D

Thanks so much for pointing me in the right direction. In the mean time
your blog makes for excellent reading! Keep up the good work.

Best regards,

Keith


-----Original Message-----
From: Massimo Belgrano <mbel...@deltain.it>
Reply-to: harbou...@googlegroups.com
To: harbou...@googlegroups.com
Subject: Re: [harbour-users] Foxbase to Harbour

--
Massimo Belgrano

--

Reply all
Reply to author
Forward
0 new messages