Files
harbour-core/harbour/tests/testcdx.prg
Viktor Szakats e1a3aaff59 2012-09-11 22:04 UTC+0200 Viktor Szakats (harbour syenar.net)
+ doc/en/hbflock.txt
  + tests/tflock.prg
    + Documentation and test code for Harbour file locking functions
      Contributed by Doug.

  * tests/tflock.prg
    * Code fixed to build in -w3 mode and simplified.

  * contrib/hbformat/hbfmtcls.prg
    ! Fixed to indent OTHERWISE statement properly
    ! Fixed to not pad '++', '--' and '->' operators
    ! Fixed not uppercasing FOR/NEXT keywords
    ! Fixed not recognizing 'CREATE CLASS' as class declaration statement
    ! Fixed to not indent '//' comments
    ! Fixed to not add space between characters of codeblock operator '{|'
    ; Patches by Maurizio la Cecilia.

  * contrib/hbformat/hbfmtcls.prg
    % minor rework to not avoid using '=' (SET EXACT dependent)
      operator and OTHERWISE/ELSE to be handled with adding
      exception cases. Maurizio, please verify me.

  * tests/db_brows.prg
  * tests/testcdx.prg
    * modified after testing new hbformat with them
2012-09-11 20:15:27 +00:00

52 lines
1.3 KiB
Plaintext

/*
* $Id$
*/
PROCEDURE Main()
LOCAL aStruct := { ;
{ "CHARACTER", "C", 25, 0 }, ;
{ "NUMERIC", "N", 8, 0 }, ;
{ "DOUBLE", "N", 8, 2 }, ;
{ "DATE", "D", 8, 0 }, ;
{ "MEMO", "M", 10, 0 }, ;
{ "LOGICAL", "L", 1, 0 } }
CLS
dbUseArea( .T. , "DBFCDX", "test", "TESTDBF", .T. , .F. )
dbCreate( "testcdx", aStruct, "DBFCDX", .T. , "TESTCDX" )
? "RddName:", rddName()
// ? "Press any key to continue..."
// InKey( 0 )
Select( "TESTDBF" )
SET FILTER TO TESTDBF->SALARY > 140000
TESTDBF->( dbGoTop() )
// WHILE !TESTDBF->( Eof() )
// TESTCDX->( dbAppend() )
// TESTCDX->CHARACTER := TESTDBF->FIRST
// TESTCDX->NUMERIC := TESTDBF->SALARY
// TESTCDX->MEMO := TESTDBF->FIRST + Chr( 13 ) + Chr( 10 ) + ;
// TESTDBF->LAST + Chr( 13 ) + Chr( 10 ) + ;
// TESTDBF->STREET
// TESTDBF->( dbSkip() )
// ENDDO
? TESTCDX->( RecCount() )
TESTCDX->( dbGoTop() )
? TESTCDX->( EOF() )
WHILE !TESTCDX->( EOF() )
? TESTCDX->( RecNo() ), TESTCDX->NUMERIC
? TESTCDX->MEMO
TESTCDX->( dbSkip() )
// ? "Press any key to continue..."
// InKey( 0 )
ENDDO
FErase( "testcdx.cdx" )
Select( "TESTCDX" )
ordCreate( "testcdx", "Character", "CHARACTER", FIELD->CHARACTER, .F. )
RETURN