Alaska Software Inc. - Newbee
Username: Password:
AuthorTopic: Newbee
DavidNewbee
on Thu, 27 Apr 2006 11:00:45 +0200
Hi,

I am totally new to the world of CLIPPER. here at the office, the previous
responsable for computer, has left a software (using clipper) in MS DOS. No
we want to see if it can be converted to clipper under windows using SQL
server.

1) is it difficult converting everything to winodws?
2) If I convert the DB to SQL, how do you connect it then? What are the
codes for using it?
3) Would it be better to start from zero? or doing the convertion?
4) if there are any good books, please tell me!!!!

Thx already,

David
mark carew Re: Newbee
on Thu, 27 Apr 2006 20:31:23 +1000
Hi David,

Suggest you get somebody to review the code for you to see what would be
involved in converting it to xBase++. What version of clipper was it being
compiled in?. e.g. summer 87 or 5.2e. Is it networked? If so what network
is it currently running on?

HTH
Mark


> Hi,
> 
> I am totally new to the world of CLIPPER. here at the office, the previous
> responsable for computer, has left a software (using clipper) in MS DOS. No
> we want to see if it can be converted to clipper under windows using SQL
> server.
> 
> 1) is it difficult converting everything to winodws?
> 2) If I convert the DB to SQL, how do you connect it then? What are the
> codes for using it?
> 3) Would it be better to start from zero? or doing the convertion?
> 4) if there are any good books, please tell me!!!!
> 
> Thx already,
> 
> David
DavidRe: Newbee
on Thu, 27 Apr 2006 13:27:49 +0200
Hi Mark,

first of all "thx" for responding.
It was compiled in 5.2. We are running a Windows network. The problem we 
have for example now, is that the security must be low if you want to use 
the program, which means that nobody who uses the program can be in the 
domain if the want to print something. If printing is not necesary they can 
execute it in a MS DOS-box.

I thought it would be something like I used to have done in the past with 
C++ to C++ Builder of Borland. Using the codes and just building the GUI. 
Would that be the same using Xbase?

We are at a dilema here in the office. We thought of writing from scratch 
some new software or just convert the old on to a windows-based one......

regards,

David

P.S.: If I ask stupid question it is because I never worked with Clipper 
before. I am one of the Basic-> Cobol -> C -> C++ -> C++ Builder -> 
ASP/XML/SQL  Guys 



"mark carew" <markcarew@magicwanddept.com.au> escribi en el mensaje 
news:8yynhevtzz35$.1sal2mb2cw8f0.dlg@40tude.net...
>
> Hi David,
>
> Suggest you get somebody to review the code for you to see what would be
> involved in converting it to xBase++. What version of clipper was it being
> compiled in?. e.g. summer 87 or 5.2e. Is it networked? If so what network
> is it currently running on?
>
> HTH
> Mark
>
>
>> Hi,
>>
>> I am totally new to the world of CLIPPER. here at the office, the 
>> previous
>> responsable for computer, has left a software (using clipper) in MS DOS. 
>> No
>> we want to see if it can be converted to clipper under windows using SQL
>> server.
>>
>> 1) is it difficult converting everything to winodws?
>> 2) If I convert the DB to SQL, how do you connect it then? What are the
>> codes for using it?
>> 3) Would it be better to start from zero? or doing the convertion?
>> 4) if there are any good books, please tell me!!!!
>>
>> Thx already,
>>
>> David
James Loughner Re: Newbee
on Thu, 27 Apr 2006 09:53:41 -0400
It really depends on the quality of the Clipper code. If it was written 
like an old dBase III program it is much more difficult then if it was 
written for and used more modern technics and screen design.

I am currently converting 700K lines of very old Clipper code that was 
written like a first time programmer and it is a total rewrite little is 
salvageable. I have worked on other programs and it was just a matter of 
designing a GUI  and massaging the business code a little.

You might check out TopDown and/or Express++ as they both can ease the 
transition to GUI But that assumes well written code to start with.

Jim

David wrote:
> Hi Mark,
> 
> first of all "thx" for responding.
> It was compiled in 5.2. We are running a Windows network. The problem we 
> have for example now, is that the security must be low if you want to use 
> the program, which means that nobody who uses the program can be in the 
> domain if the want to print something. If printing is not necesary they can 
> execute it in a MS DOS-box.
> 
> I thought it would be something like I used to have done in the past with 
> C++ to C++ Builder of Borland. Using the codes and just building the GUI. 
> Would that be the same using Xbase?
> 
> We are at a dilema here in the office. We thought of writing from scratch 
> some new software or just convert the old on to a windows-based one......
> 
> regards,
> 
> David
> 
> P.S.: If I ask stupid question it is because I never worked with Clipper 
> before. I am one of the Basic-> Cobol -> C -> C++ -> C++ Builder -> 
> ASP/XML/SQL  Guys 
> 
> 
> 
> "mark carew" <markcarew@magicwanddept.com.au> escribió en el mensaje 
> news:8yynhevtzz35$.1sal2mb2cw8f0.dlg@40tude.net...
>> Hi David,
>>
>> Suggest you get somebody to review the code for you to see what would be
>> involved in converting it to xBase++. What version of clipper was it being
>> compiled in?. e.g. summer 87 or 5.2e. Is it networked? If so what network
>> is it currently running on?
>>
>> HTH
>> Mark
>>
>>
>>> Hi,
>>>
>>> I am totally new to the world of CLIPPER. here at the office, the 
>>> previous
>>> responsable for computer, has left a software (using clipper) in MS DOS. 
>>> No
>>> we want to see if it can be converted to clipper under windows using SQL
>>> server.
>>>
>>> 1) is it difficult converting everything to winodws?
>>> 2) If I convert the DB to SQL, how do you connect it then? What are the
>>> codes for using it?
>>> 3) Would it be better to start from zero? or doing the convertion?
>>> 4) if there are any good books, please tell me!!!!
>>>
>>> Thx already,
>>>
>>> David 
> 
>
Stu FraserRe: Newbee
on Thu, 27 Apr 2006 09:29:49 -0700
Hi David,

I would have to second what James and Mark have said.  It's really going to 
depend on the quality of the code.  That being said, I have done a couple of 
dozen applications now from clipper to Xbase++, some were a breeze and some 
where a nightmare, ( read attempted, then complete rewrite ).  However my 
background is Clipper / xBase languages in general.  It probably really 
would be to your benefit to have someone with some clipper experience take a 
look at the code before you proceed since you are not only talking about 
converting to windows, but also about changing the back end to something SQL 
based.

Looking at it from an IPO stand point, when converting a clipper application 
you usually have to change the Input screens, and the Output reports, due to 
the conversion to Windows, but the meat of the application is the 
Processing.  This you generally get to keep.   If you are changing the back 
end from DBF/NTX tables to SQLServer for instance, you are going to have to 
touch all that code as well.  At that point you have an almost complete 
rewrite already.  For an old clipper head like myself, that might still be 
worth it.  For someone new to the whole thing I'm not really sure and the 
quality of the code comes into play here again.

If you do decide to jump into the Xbase++ arena, you will most definitely 
want to pick up either TopDown or Express++, both 3rd party Libs that will 
make life much easier.  You'll also want to look at SQL Express if you are 
going SQL.  I have used it to integrate Xbase applications with Oracle 
databases here and would highly recommend it to anyone, particularly if you 
have some SQL background already.

Hope that helps,

Stu.


Stu Fraser
Senior Programmer Analyst
IBM Managed Operations / BC Ministry of Health
Victoria, BC
"David" <davido2001@hotmail.com> wrote in message 
news:4c12fe9b$613e6302$819c0@news.alaska-software.com...
> Hi Mark,
>
> first of all "thx" for responding.
> It was compiled in 5.2. We are running a Windows network. The problem we 
> have for example now, is that the security must be low if you want to use 
> the program, which means that nobody who uses the program can be in the 
> domain if the want to print something. If printing is not necesary they 
> can execute it in a MS DOS-box.
>
> I thought it would be something like I used to have done in the past with 
> C++ to C++ Builder of Borland. Using the codes and just building the GUI. 
> Would that be the same using Xbase?
>
> We are at a dilema here in the office. We thought of writing from scratch 
> some new software or just convert the old on to a windows-based one......
>
> regards,
>
> David
>
> P.S.: If I ask stupid question it is because I never worked with Clipper 
> before. I am one of the Basic-> Cobol -> C -> C++ -> C++ Builder -> 
> ASP/XML/SQL  Guys :-)
>
>
>
> "mark carew" <markcarew@magicwanddept.com.au> escribi en el mensaje 
> news:8yynhevtzz35$.1sal2mb2cw8f0.dlg@40tude.net...
>>
>> Hi David,
>>
>> Suggest you get somebody to review the code for you to see what would be
>> involved in converting it to xBase++. What version of clipper was it 
>> being
>> compiled in?. e.g. summer 87 or 5.2e. Is it networked? If so what network
>> is it currently running on?
>>
>> HTH
>> Mark
>>
>>
>>> Hi,
>>>
>>> I am totally new to the world of CLIPPER. here at the office, the 
>>> previous
>>> responsable for computer, has left a software (using clipper) in MS DOS. 
>>> No
>>> we want to see if it can be converted to clipper under windows using SQL
>>> server.
>>>
>>> 1) is it difficult converting everything to winodws?
>>> 2) If I convert the DB to SQL, how do you connect it then? What are the
>>> codes for using it?
>>> 3) Would it be better to start from zero? or doing the convertion?
>>> 4) if there are any good books, please tell me!!!!
>>>
>>> Thx already,
>>>
>>> David
>
>
DavidRe: Newbee
on Fri, 28 Apr 2006 12:12:33 +0200
Thx Stu And James,

As far as I know the program is written in the beginning of the 90'.
Personally for me it will be less dramatic for writing the whole software 
from scratch using PowerBuilder (which i am quit familiar with). But that 
only if it really will give me nightmares converting the stuff.

There is nobody I know who knows this language, would it be much to ask if I 
send here in the newsgroup the first, I dont know, 100 lines? and you could 
tell me if it is worth it converting it or not?

Many thx,

David



"Stu Fraser" <sfraser@zero-g.ca> escribi en el mensaje 
news:4cb94ed$6d7f08c2$83f10@news.alaska-software.com...
> Hi David,
>
> I would have to second what James and Mark have said.  It's really going 
> to depend on the quality of the code.  That being said, I have done a 
> couple of dozen applications now from clipper to Xbase++, some were a 
> breeze and some where a nightmare, ( read attempted, then complete 
> rewrite ).  However my background is Clipper / xBase languages in general. 
> It probably really would be to your benefit to have someone with some 
> clipper experience take a look at the code before you proceed since you 
> are not only talking about converting to windows, but also about changing 
> the back end to something SQL based.
>
> Looking at it from an IPO stand point, when converting a clipper 
> application you usually have to change the Input screens, and the Output 
> reports, due to the conversion to Windows, but the meat of the application 
> is the Processing.  This you generally get to keep.   If you are changing 
> the back end from DBF/NTX tables to SQLServer for instance, you are going 
> to have to touch all that code as well.  At that point you have an almost 
> complete rewrite already.  For an old clipper head like myself, that might 
> still be worth it.  For someone new to the whole thing I'm not really sure 
> and the quality of the code comes into play here again.
>
> If you do decide to jump into the Xbase++ arena, you will most definitely 
> want to pick up either TopDown or Express++, both 3rd party Libs that will 
> make life much easier.  You'll also want to look at SQL Express if you are 
> going SQL.  I have used it to integrate Xbase applications with Oracle 
> databases here and would highly recommend it to anyone, particularly if 
> you have some SQL background already.
>
> Hope that helps,
>
> Stu.
>
>
> -- 
> Stu Fraser
> Senior Programmer Analyst
> IBM Managed Operations / BC Ministry of Health
> Victoria, BC
> "David" <davido2001@hotmail.com> wrote in message 
> news:4c12fe9b$613e6302$819c0@news.alaska-software.com...
>> Hi Mark,
>>
>> first of all "thx" for responding.
>> It was compiled in 5.2. We are running a Windows network. The problem we 
>> have for example now, is that the security must be low if you want to use 
>> the program, which means that nobody who uses the program can be in the 
>> domain if the want to print something. If printing is not necesary they 
>> can execute it in a MS DOS-box.
>>
>> I thought it would be something like I used to have done in the past with 
>> C++ to C++ Builder of Borland. Using the codes and just building the GUI. 
>> Would that be the same using Xbase?
>>
>> We are at a dilema here in the office. We thought of writing from scratch 
>> some new software or just convert the old on to a windows-based one......
>>
>> regards,
>>
>> David
>>
>> P.S.: If I ask stupid question it is because I never worked with Clipper 
>> before. I am one of the Basic-> Cobol -> C -> C++ -> C++ Builder -> 
>> ASP/XML/SQL  Guys 
>>
>>
>>
>> "mark carew" <markcarew@magicwanddept.com.au> escribi en el mensaje 
>> news:8yynhevtzz35$.1sal2mb2cw8f0.dlg@40tude.net...
>>>
>>> Hi David,
>>>
>>> Suggest you get somebody to review the code for you to see what would be
>>> involved in converting it to xBase++. What version of clipper was it 
>>> being
>>> compiled in?. e.g. summer 87 or 5.2e. Is it networked? If so what 
>>> network
>>> is it currently running on?
>>>
>>> HTH
>>> Mark
>>>
>>>
>>>> Hi,
>>>>
>>>> I am totally new to the world of CLIPPER. here at the office, the 
>>>> previous
>>>> responsable for computer, has left a software (using clipper) in MS 
>>>> DOS. No
>>>> we want to see if it can be converted to clipper under windows using 
>>>> SQL
>>>> server.
>>>>
>>>> 1) is it difficult converting everything to winodws?
>>>> 2) If I convert the DB to SQL, how do you connect it then? What are the
>>>> codes for using it?
>>>> 3) Would it be better to start from zero? or doing the convertion?
>>>> 4) if there are any good books, please tell me!!!!
>>>>
>>>> Thx already,
>>>>
>>>> David
>>
>>
>
>
mark carew Re: Newbee
on Fri, 28 Apr 2006 09:51:40 +1000
Hi David,

Why not show us a typical piece code that illustrates the style it's
written in and we may be able to make some suggestions as to its'
suitability for conversion. A couple of hunderd lines, of reasonably
complicated stuff,should suffice.

Regards
Mark
DavidRe: Newbee
on Fri, 28 Apr 2006 12:14:55 +0200
Hi Mark,

here is some code. Thx already!!
=== BEGIN CODE===
*set wrap on
*set delete on
*set date italian
*SET EXCLUSIVE OFF
*restore from empre
clear
RESTORE FROM CONTROL ADDITIVE
xtipo=1
lfin:=30
xcantidad:=space(4)
@ 1,10 , 3,45 box 'ͻȺ'
if xtipo=1
   set color to i
   @ 02,50 say m->empresa
endif
@ 2,12 say  '    CAMBIOS DE LOCALIZACION    '
Blanco2:=' C.N. CANT  LOC.ACT.      DESCRIPCION      LOC.NUE. OPSTOCK 
FECHA   HORA'
*          1234567890123
@04,00 say Blanco2
@ lfin+1,00 say ' 
<F1> Ayuda '
set color to
blanco=  '                                                            
     '
for i =5 to lfin
  @ i,00 say blanco
next
nrocolo:=0
ncodper:=0
ncodcol:=0
nLocaliza:=space(10)
use mae_age ALIAS age New Readonly
if !abre_fich()
   RELEASE ALL
   close all
   return
endif
Set index to i_age1
use mae_art NEW ALIAS ART
if !abre_fich()
   RELEASE ALL
   close all
   return
endif
sET index TO I_ART1,I_ART2,I_ART3,I_ART4,i_art5,I_ART6
use localiza NEW ALIAS loc
if !abre_fich()
   RELEASE ALL
   close all
   return
endif
sET index TO I_loc1,I_loc2,I_loc3
*DbSetRelation( 'Art',{|| str(cod_art,6) } )
Loc->(Dbgobottom())
loc->(DbSkip(-10))

li=0
save screen to p01
set cursor off
Persi_loc()

do while .t.

   Lin_loc(li,'i',.t.)
   Acti_Loc(.T.)
   set cursor off
   set console off
   wait
   set console on
   set cursor on
   Acti_Loc(.f.)
   Lin_loc(li,'',.f.)

   do case
      case lastkey()=27
           release all
           close all
           return

      case lastkey()=5
           Loc->(Dbskip( -1 ))
           if Loc->(bof())
              error('Principio de Fichero')
              IF Loc->(!BOF())
                 Loc->(DbSKIP())
              ENDIF
           else
              if li=5
                  scroll(05,00,lfin,78,-1)
                  @ 05,00 say blanco
              else
                  li=li-1
              endif
           endif

      case lastkey()=24
           Loc->(Dbskip())
           if Loc->(eof())
              error('Final de Fichero')
              Loc->(Dbskip( -1 ))
           else
              if li=lfin
                  scroll(05,00,lfin,78,1)
                  @ lfin,00 say blanco
              else
                  li=li+1
              endif
           endif

      case lastkey()=1
           go top
           Persi_loc()

      case lastkey()=6
           go bottom
           SKIP -1
           Persi_loc()

      case lastkey()=3
           XXAA=RECNO()
           skip 10
           if eof()
              error('Final de Recibos')
              go xxaa
           endif
           Persi_loc()

      case lastkey()=127

           Lin_loc(li,'i',.t.)
           if s_n('ATENCION','BORRAR ESTA LINEA',.T.,'N')
              IF LASTKEY()#27
                 IF !RLOCK()
                    ERROR('LINEA BLOQUEADA ')
                 ELSE
                    delete
                    skip -1
                 ENDIF
              ENDIF
           ENDIF
           Persi_loc()

      case lastkey()=18
           XXAA=RECNO()
           skip -10
           if bof()
              error('Principio de Fichero')
              go xxaa
           endif
           Persi_loc()

      case lastkey()=13
          *If loc->Cod_art==Art->Cod_art
          *   If dtos(date())=dtos(loc->fecha)
          *      IF Loc->(rlock())
          *         IF Art->(rlock())
          *            CLOCA:=Loc->Localinue
          *            @ li,53 GET lOC->cod_ope             pict '99'
          *            @ li,58 GET lOC->localiNue
                      SET CURSOR ON
                      READ
                      SET CURSOR OFF
                      @ li,00 say blanco
          *            if Loc->Localinue#cLoca
          *               replace art->Localiza with Loc->localinue
                      Endif
                      Art->(DbUnlock())
                   Else
                      error('FICHERO DE ARTICULOS BLOQUEADO')
                   Endif
                   Loc->(DbUnlock())
                Else
                   error('FICHERO DE LOCALIZACIONES BLOQUEADO')
                Endif
             Else
          *      error('Linea no Modificable')
          *   Endif
          Else
             error('Articulo no Encontrado')
          *Endif

      case lastkey()=22
           XXAA=RECNO()
           xart=0
           xart1:=space(6)
           @ LI,0 SAY BLANCO
           @ li,0 GET xart1             pict '999999'
           SET CURSOR ON
           READ
           SET CURSOR OFF
           IF LASTKEY()=27
              loop
           ENDIF
          *loc->(DbClearRelation())
           Select('Art')
           if len(rtrim(xart1))>6
             *error( 'codigo ean')
              art->(DbSetOrder(6))
              art->(Dbseek( xart1 ))
              if art->cean13#xart1
                 creacean13(XART1)
               * xart:=val(substr(str(xart,13),7,6))
               * Art->(DbSetOrder(3))
               * Art->(DbSeek( STR(xART,6) ))
              Endif
           Else
              xart=val(xart1)
              Art->(DbSetOrder(1))
              Art->(DbSeek( STR(xART,6) ))
           Endif
           if Art->(Eof())
              error( 'Articulo no Encontrado')
              Select('Loc')
            * DbSetRelation( 'Art',{|| str(cod_art,6) } )
              loop
           Else
              xart:=Art->cod_art
              Art->(DbSetOrder(1))
           Endif
           Select('Loc')
           APPEND BLANK
           do while NETERR()
              error('FICHERO DE RECIBOS BLOQUEADO')
              APPEND BLANK
           ENDDO
           do while !rlock()
              error('FICHERO DE RECIBOS BLOQUEADO')
           ENDDO

     Loc->cod_art := xart
           Loc->(Dbcommit())
           xxaa:=Loc->(Recno())
           Loc->( Dbgoto( xxaA ) )
           Loc->cod_nac := Art->cod_nac
           Loc->cod_art := Art->cod_art
           Loc->LOCALIact := Art->LOCALIZA
           Loc->cod_ope   := ncodper
           Loc->fecha     := date()
           Loc->hora      := Left(time(),5)
           Loc->(Dbcommit())

          *DbSetRelation( 'Art',{|| str(cod_art,6) } )
           Lin_loc(li,'',.f.)
           xlocANT:=space(10)
           xlocnue:=xlocnue1:=xlocnue2:=space(10)
           if art->Cod_art==Loc->Cod_art
              if art->(Rlock())
                 lsalir:=.f.
                 @ li,07 GET xcantidad           pict '@s4'
   @ li,12 GET xlocANT             pict '@s10'  VALID BUSREPO2('xlocant')
                 @ li,46 GET xlocnue             pict '@s10'  VALID 
BUSREPO2('xlocnue')
                *@ li+1,48 GET xlocnue1          pict '@s8'  VALID 
BUSREPO2('xlocnue1')
                *@ li+2,48 GET xlocnue2          pict '@s8'  VALID 
BUSREPO2('xlocnue2')
                 @ li,57 GET cod_ope             pict '99'
                 SET CURSOR ON
                 READ
                 SET CURSOR OFF
                 IF LASTKEY()#27
                    if xlocnue#space(10)
                       loc->localinue:=xlocnue
                       loc->cantidad:=xcantidad
                    Endif
                    loc->(DbCommit())
                    IF LEN(RTRIM(LOC->LOCALINUE))>0
                       IF LOC->reposicion$' S'
                          replace art->Localiza with Loc->localinue
                       Endif
                    eNDIF
                 eLSE
                    ERROR( 'MERCANCIA NO UBICADA' )
                    ?? CHR(7)+CHR(7)+CHR(7)
                 eNDIF
                 Art->(DbCommit())
                 Art->(DbUNlock())
                 ncodper:=loc->cod_ope
                 IF LASTKEY()#27
                    KEYBOARD( CHR(22))
                 ENDIF
              Endif
           Endif
           Loc->(DbUnlock())
           Persi_loc()

      endcase
enddo

*************************************
FUNCTION Lin_loc
parameters lli,col,vvv
IF ART->COD_ART#LOC->COD_ART
   art->(Dbseek( str(loc->Cod_art,6)))
Endif
set color to &col
@ lli,00 say left(cod_Nac,6)             pict '999999'
@ lli,07 say cantidad  pict '9999'
@ lli,12 say localiact
@ lli,23 say Left(Art->Descrip,22)
@ lli,46 say localiNue
@ lli,57 say cod_ope             pict '99'
@ lli,60 say ART->STOCK_R  pICT '99999'
@ lli,66 say strtran(dtoc(fecha),'-20','-')
@ lli,75 say hora
set color to
if vvv
   xage:=700+cod_ope
   Age->(DbSeek( Str(xage,4) ))
   if age->(!Eof())
      BARRA:=' '+age->nombre+' S.Dis.: 
'+str(art->stock_r-art->stock_pen,5)+'  PVP.: '+str(art->pvp,6,2)+' 
<F1> Ayuda '
   Else
      BARRA:=' '+SPACE(30)+' S.Dis.: '+str(art->stock_r-art->stock_pen,5)+' 
PVP.: '+str(art->pvp,6,2)+'               <F1> Ayuda '
   Endif
   @lfin+1,00 say BARRA Color 'i'
Endif
RETURN .T.
*********************************************************************
FUNCTION Persi_loc

set color to i
@ 04,00 say ' '
set color to
xxaa=Loc->(recno())
do while Loc->(!eof()) .and. row()<lfin+1
   Lin_loc(row()+1,'',.f.)
   Loc->(Dbskip())
enddo
Loc->(Dbgoto( xxaa ))
li=5
if row()<lfin+1
   for i=row()+1 to lfin
       @ i,00 say blanco
   next
endif

RETURN .T.
*******************************************
FUNCTION Acti_Loc
PARAMETERS V
IF V
   SET KEY 28 TO ayu_loc
   SET KEY -1 TO CamOrLoc
   SET KEY 9 TO coloca
ELSE
   SET KEY 28 TO
   SET KEY -1 TO
   SET KEY 9 TO
ENDIF
RETURN .T.
*******************************************
function AYU_Loc
SAVE SCREEN
Acti_Loc(.f.)
set color to i
@ 3,13, 15,67 box 'ͻȺ '
@ 03,35 SAY 'AYUDA'
@ 04,15 SAY ' <Esc>      Abandona Opcion                       '
@ 05,15 SAY ' <>        Registro Arriba                       '
@ 06,15 SAY ' <>        Registro Abajo                        '
@ 07,15 SAY ' <Re.Pag.>  Pagina Arriba                         '
@ 08,15 SAY ' <Av.Pag.>  Pagina Abajo                          '
@ 09,15 SAY ' <Inicio>   Primer Registro                       '
@ 10,15 SAY ' <Fin>      Ultimo Registro                       '
@ 11,15 SAY ' <Supr>     Borra Registro                        '
@ 12,15 SAY ' <Intro>    Modifica Registro                     '
@ 13,15 SAY ' <Insert>   Introduce Registro                    '
@ 14,15 SAY ' <F2>       Ordena por Campo                      '
set color to
ERROR('')
Acti_Loc(.t.)
RESTORE SCREEN
RETURN .t.
*********************************************
Function CamOrLoc
op:=1

@04,00 say Blanco2
set intensity on
@04,01 prompt 'CODIGO'
@04,62 prompt '   FECHA  '
menu to op
set intensity off


do case
   case op = 0
           set color to i
           @04,00 say Blanco2
           set color to
           return
   case op = 1
           campo=0
           @05,0 get campo pict '999999'
   case op = 2
           campo=ctod('        ')
           @05,62 get campo
endcase

set cursor on
read
set cursor off
if Lastkey()#27
   lOC->(DbSetOrder( if(op=1,1,3) ))
   Loc->(DbSeek( if(op=1,campo,Dtos(Campo)),.t.))
   Persi_loc()
Endif
set color to i
@04,00 say blanco2
set color to

RETURN

***************************************
Function BusRepo()
LOCAL  GetList:={}

IF RTRIM(ART->LOCALIZA) # RTRIM(XLOCANT)
   @24,10 SAY 'LOCALIZACION ERRONEA VERIFIQUE ULTIMA UBICACION' COLOR 'W+*'
   ?? CHR(7)+CHR(7)+CHR(7)
   INKEY(0)
   @24,10 SAY '                                               '
   KEYBOARD( CHR(27))
eNDIF

Return .t.
***************************************
=== END CODE ===

here after it just has some other functions....

"mark carew" <markcarew@magicwanddept.com.au> escribi en el mensaje 
news:1bkv5cf5pu7gu.pl0tw8r81f5a$.dlg@40tude.net...
> Hi David,
>
> Why not show us a typical piece code that illustrates the style it's
> written in and we may be able to make some suggestions as to its'
> suitability for conversion. A couple of hunderd lines, of reasonably
> complicated stuff,should suffice.
>
> Regards
> Mark
mark carew Re: Newbee
on Sat, 29 Apr 2006 12:43:36 +1000
Hi David,

You could compile the code you have shown using xBase+ with very few
modifications. e.g. 
procedure main( --- must be the entry point

This would give you a text or hybrid (gui and text) mode app.

Regards
Mark
James Loughner Re: Newbee
on Fri, 28 Apr 2006 23:21:48 -0400
This looks like reasonably good code. You should look to Express++ or 
TopDown to do the conversion. Express uses syntax very like Clipper to 
create and update windows a lot can be done with global search/replaces 
of SAY/GETs. Topdown uses a more function oriented and would probably 
require a bit more hand editing. It depends on what your more 
comfortable with. both have solutions to move reports into Xbase++

Note you must be careful if any old Clipper third party libraries were 
used for the most part these must be replaced with you own functions or 
new different third party libs.

If it were me I'd do the screens in he FD and move the 
validation/business logic into classes. But that just me 

Jim