From 2f285ca6c2788e6ecc27b6a9d614ad7e82b4b334 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 5 Nov 2012 11:37:36 +0000 Subject: [PATCH] 2012-11-05 12:32 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/hbamf/tests/tstendin.prg * contrib/hbblat/blatcls.prg * contrib/hbct/tests/ctwtest.prg * contrib/hbct/tests/token2.prg * contrib/hbhttpd/readme.txt * contrib/hbhttpd/widgets.prg * contrib/hbmisc/fileread.prg * contrib/hbmisc/hbedit.prg * contrib/hbmysql/diff-en.txt * contrib/hbmysql/diff-es.txt * contrib/hbmysql/tests/dbf2mysq.prg * contrib/hbmysql/tmysql.prg * contrib/hbmysql/tsqlbrw.prg * contrib/hbnetio/tests/netiot03.prg * contrib/hbnetio/tests/netiotst.prg * contrib/hbnf/doc/en/fttext.txt * contrib/hbodbc/browodbc.prg * contrib/hbodbc/tests/odbcdemo.prg * contrib/hbodbc/todbc.prg * contrib/hbtip/ftpcli.prg * contrib/hbwin/tests/olesrv1.prg * contrib/rddads/ads.ch * contrib/rddsql/readme.txt * contrib/sddodbc/tests/test2.prg * contrib/xhb/dbf2txt.c * contrib/xhb/hbcompat.ch * contrib/xhb/hblog.prg * contrib/xhb/html.ch * contrib/xhb/tfile.prg * contrib/xhb/tframe.prg * contrib/xhb/ttable.prg * ChangeLog * doc/en/dbdelim.txt * doc/en/dbsdf.txt * doc/en/rdddb.txt * doc/en/terminal.txt * extras/gtwvw/tests/wvt2wvw.ch * extras/httpsrv/cookie.prg * extras/httpsrv/modules/tableservletdb.prg * extras/rddado/adordd.ch * extras/rddado/adordd.prg * include/assert.ch * include/hbsix.ch * src/debug/dbgbrwsr.prg * src/debug/dbgtinp.prg * src/rdd/*.prg * src/rtl/*.prg * tests/*.prg * tests/rddtest/rddtst.prg * tests/usrrdd/exarr.prg * tests/usrrdd/exfcm.prg * utils/hbtest/hbtest.prg * more minor --- harbour/ChangeLog | 55 ++++ harbour/contrib/hbamf/tests/tstendin.prg | 2 +- harbour/contrib/hbblat/blatcls.prg | 2 +- harbour/contrib/hbct/tests/ctwtest.prg | 4 +- harbour/contrib/hbct/tests/token2.prg | 12 +- harbour/contrib/hbhttpd/readme.txt | 62 ++--- harbour/contrib/hbhttpd/widgets.prg | 2 +- harbour/contrib/hbmisc/fileread.prg | 4 +- harbour/contrib/hbmisc/hbedit.prg | 2 +- harbour/contrib/hbmysql/diff-en.txt | 49 ++-- harbour/contrib/hbmysql/diff-es.txt | 39 ++- harbour/contrib/hbmysql/tests/dbf2mysq.prg | 2 +- harbour/contrib/hbmysql/tmysql.prg | 12 +- harbour/contrib/hbmysql/tsqlbrw.prg | 8 +- harbour/contrib/hbnetio/tests/netiot03.prg | 14 +- harbour/contrib/hbnetio/tests/netiotst.prg | 6 +- harbour/contrib/hbnf/doc/en/fttext.txt | 4 +- harbour/contrib/hbodbc/browodbc.prg | 2 +- harbour/contrib/hbodbc/tests/odbcdemo.prg | 2 +- harbour/contrib/hbodbc/todbc.prg | 2 +- harbour/contrib/hbtip/ftpcli.prg | 2 +- harbour/contrib/hbwin/tests/olesrv1.prg | 2 +- harbour/contrib/rddads/ads.ch | 4 +- harbour/contrib/rddsql/readme.txt | 16 +- harbour/contrib/sddodbc/tests/test2.prg | 2 +- harbour/contrib/xhb/dbf2txt.c | 2 +- harbour/contrib/xhb/hbcompat.ch | 248 +++++++++--------- harbour/contrib/xhb/hblog.prg | 8 +- harbour/contrib/xhb/html.ch | 16 +- harbour/contrib/xhb/tfile.prg | 8 +- harbour/contrib/xhb/tframe.prg | 4 +- harbour/contrib/xhb/ttable.prg | 4 +- harbour/doc/en/dbdelim.txt | 2 +- harbour/doc/en/dbsdf.txt | 2 +- harbour/doc/en/rdddb.txt | 2 +- harbour/doc/en/terminal.txt | 2 +- harbour/extras/gtwvw/tests/wvt2wvw.ch | 48 ++-- harbour/extras/httpsrv/cookie.prg | 2 +- .../extras/httpsrv/modules/tableservletdb.prg | 2 +- harbour/extras/rddado/adordd.ch | 2 +- harbour/extras/rddado/adordd.prg | 4 +- harbour/include/assert.ch | 2 +- harbour/include/hbsix.ch | 2 +- harbour/src/debug/dbgbrwsr.prg | 8 +- harbour/src/debug/dbgtinp.prg | 4 +- harbour/src/rdd/dbdelim.prg | 2 +- harbour/src/rdd/dbjoin.prg | 4 +- harbour/src/rdd/dbstrux.prg | 2 +- harbour/src/rdd/dbupdat.prg | 6 +- harbour/src/rdd/rddord.prg | 2 +- harbour/src/rtl/achoice.prg | 36 +-- harbour/src/rtl/browse.prg | 2 +- harbour/src/rtl/errsys.prg | 4 +- harbour/src/rtl/memoedit.prg | 2 +- harbour/src/rtl/menusys.prg | 4 +- harbour/src/rtl/objfunc.prg | 6 +- harbour/src/rtl/scrollbr.prg | 6 +- harbour/src/rtl/teditor.prg | 6 +- harbour/src/rtl/tmenusys.prg | 4 +- harbour/src/rtl/tpopup.prg | 2 +- harbour/src/rtl/tpopuphb.prg | 2 +- harbour/src/rtl/treport.prg | 4 +- harbour/src/rtl/ttopbar.prg | 2 +- harbour/src/rtl/typefile.prg | 2 +- harbour/tests/ac_test2.prg | 2 +- harbour/tests/aliaslck.prg | 2 +- harbour/tests/cpinfo.prg | 28 +- harbour/tests/gtchars.prg | 2 +- harbour/tests/gtkeys.prg | 2 +- harbour/tests/inherit.prg | 4 +- harbour/tests/newrdd.prg | 12 +- harbour/tests/rddtest/rddtst.prg | 4 +- harbour/tests/sdf_test.prg | 2 +- harbour/tests/speedtst.prg | 16 +- harbour/tests/stripem.prg | 2 +- harbour/tests/tb1.prg | 2 +- harbour/tests/testbrw.prg | 2 +- harbour/tests/testcdx.prg | 6 +- harbour/tests/testdbf.prg | 10 +- harbour/tests/testntx.prg | 12 +- harbour/tests/testrdd2.prg | 6 +- harbour/tests/uc16_gen.prg | 6 +- harbour/tests/usrrdd/exarr.prg | 4 +- harbour/tests/usrrdd/exfcm.prg | 4 +- harbour/utils/hbtest/hbtest.prg | 2 +- 85 files changed, 482 insertions(+), 429 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 241a16c267..887c82809c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,61 @@ The license applies to all entries newer than 2009-04-28. */ +2012-11-05 12:32 UTC+0100 Viktor Szakats (harbour syenar.net) + * contrib/hbamf/tests/tstendin.prg + * contrib/hbblat/blatcls.prg + * contrib/hbct/tests/ctwtest.prg + * contrib/hbct/tests/token2.prg + * contrib/hbhttpd/readme.txt + * contrib/hbhttpd/widgets.prg + * contrib/hbmisc/fileread.prg + * contrib/hbmisc/hbedit.prg + * contrib/hbmysql/diff-en.txt + * contrib/hbmysql/diff-es.txt + * contrib/hbmysql/tests/dbf2mysq.prg + * contrib/hbmysql/tmysql.prg + * contrib/hbmysql/tsqlbrw.prg + * contrib/hbnetio/tests/netiot03.prg + * contrib/hbnetio/tests/netiotst.prg + * contrib/hbnf/doc/en/fttext.txt + * contrib/hbodbc/browodbc.prg + * contrib/hbodbc/tests/odbcdemo.prg + * contrib/hbodbc/todbc.prg + * contrib/hbtip/ftpcli.prg + * contrib/hbwin/tests/olesrv1.prg + * contrib/rddads/ads.ch + * contrib/rddsql/readme.txt + * contrib/sddodbc/tests/test2.prg + * contrib/xhb/dbf2txt.c + * contrib/xhb/hbcompat.ch + * contrib/xhb/hblog.prg + * contrib/xhb/html.ch + * contrib/xhb/tfile.prg + * contrib/xhb/tframe.prg + * contrib/xhb/ttable.prg + * ChangeLog + * doc/en/dbdelim.txt + * doc/en/dbsdf.txt + * doc/en/rdddb.txt + * doc/en/terminal.txt + * extras/gtwvw/tests/wvt2wvw.ch + * extras/httpsrv/cookie.prg + * extras/httpsrv/modules/tableservletdb.prg + * extras/rddado/adordd.ch + * extras/rddado/adordd.prg + * include/assert.ch + * include/hbsix.ch + * src/debug/dbgbrwsr.prg + * src/debug/dbgtinp.prg + * src/rdd/*.prg + * src/rtl/*.prg + * tests/*.prg + * tests/rddtest/rddtst.prg + * tests/usrrdd/exarr.prg + * tests/usrrdd/exfcm.prg + * utils/hbtest/hbtest.prg + * more minor + 2012-11-05 03:23 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/gtwvg/*.prg * contrib/gtwvg/tests/*.prg diff --git a/harbour/contrib/hbamf/tests/tstendin.prg b/harbour/contrib/hbamf/tests/tstendin.prg index 3966663240..65091a3a96 100644 --- a/harbour/contrib/hbamf/tests/tstendin.prg +++ b/harbour/contrib/hbamf/tests/tstendin.prg @@ -41,6 +41,6 @@ STATIC PROCEDURE _TEST( a, cChkOK ) LOCAL x := AMF3_ENCODE( a ) LOCAL cChk := hb_StrToHex( I2Bin( hb_CRC( x ) ) ) - ? PadL( hb_ValToExp( a ), 18 ), hb_StrToHex( x, " " ), "CHECKSUM", cChk, iif( !Empty( cChkOK ) .AND. !( cChk == cChkOK ), "!TEST FAILED!, should be " + cChkOK, " " ) + ? PadL( hb_ValToExp( a ), 18 ), hb_StrToHex( x, " " ), "CHECKSUM", cChk, iif( ! Empty( cChkOK ) .AND. !( cChk == cChkOK ), "!TEST FAILED!, should be " + cChkOK, " " ) RETURN diff --git a/harbour/contrib/hbblat/blatcls.prg b/harbour/contrib/hbblat/blatcls.prg index d2e414aacc..2913fe5faa 100644 --- a/harbour/contrib/hbblat/blatcls.prg +++ b/harbour/contrib/hbblat/blatcls.prg @@ -237,7 +237,7 @@ METHOD PROCEDURE Check() CLASS HBBlat // The Basics ---------------------------------- // to - IF ! HB_ISSTRING( ::cTO ) .AND. ! HB_ISSTRING( ::cTOFile ) .AND. !::lToUndiscloseRecipients + IF ! HB_ISSTRING( ::cTO ) .AND. ! HB_ISSTRING( ::cTOFile ) .AND. ! ::lToUndiscloseRecipients ::nError := BLAT_ERR_MISSING_TO ::cError := ::TranslateBlatError( BLAT_ERR_MISSING_TO ) AAdd( ::aErrors, { ::nError, ::cError } ) diff --git a/harbour/contrib/hbct/tests/ctwtest.prg b/harbour/contrib/hbct/tests/ctwtest.prg index 440c95a238..a9ce2dea7c 100644 --- a/harbour/contrib/hbct/tests/ctwtest.prg +++ b/harbour/contrib/hbct/tests/ctwtest.prg @@ -79,7 +79,7 @@ PROCEDURE Main() ELSE wboard( 5, 5, 20, 75 ) ENDIF - lBoard := !lBoard + lBoard := ! lBoard ELSEIF k == hb_keyCode( "P" ) .OR. k == hb_keyCode( "P" ) y := wfrow() x := wfcol() @@ -88,7 +88,7 @@ PROCEDURE Main() @ y, x SAY "THIS IS WINDOW 0 OUTPUT" wselect( i ) ELSEIF k == K_INS - lFlag := !lFlag + lFlag := ! lFlag SetCursor( iif( lFlag, 3, 1 ) ) ELSEIF k == K_DEL SetCursor( SC_NONE ) diff --git a/harbour/contrib/hbct/tests/token2.prg b/harbour/contrib/hbct/tests/token2.prg index 96a9bc68ed..31f5511509 100644 --- a/harbour/contrib/hbct/tests/token2.prg +++ b/harbour/contrib/hbct/tests/token2.prg @@ -81,14 +81,14 @@ PROCEDURE Main() ? ' tokeninit(@cStr1, ",", 1) == .T. ? ----> ' + ltoc( tokeninit( @cStr1, ",", 1 ) ) ? ' tokennum() == 6 ? ---------------------> ' + Str( tokennum() ) ? ' tokenend() ? -------------------------> ' + ltoc( tokenend() ) - WHILE !tokenend() + WHILE ! tokenend() ? ' tokennext(@cStr1) ------------------> "' + tokennext( @cStr1 ) + '"' ? ' tokenend() ? -------------------------> ' + ltoc( tokenend() ) ENDDO ? ? ' rewind with tokeninit() == .T. ? ------> ' + ltoc( tokeninit() ) ? ' tokenend() ? -------------------------> ' + ltoc( tokenend() ) - WHILE !tokenend() + WHILE ! tokenend() ? ' tokennext(@cStr1) ------------------> "' + tokennext( @cStr1 ) + '"' ? ' tokenend() ? -------------------------> ' + ltoc( tokenend() ) ENDDO @@ -106,14 +106,14 @@ PROCEDURE Main() ? ' token environment of cStr1 !' ? ' rewind with tokeninit() == .T. ? ------> ' + ltoc( tokeninit() ) ? ' tokenend() ? -------------------------> ' + ltoc( tokenend() ) - WHILE !tokenend() + WHILE ! tokenend() ? ' tokennext(@cStr3) ------------------> "' + tokennext( @cStr3 ) + '"' ? ' tokenend() ? -------------------------> ' + ltoc( tokenend() ) ENDDO ? ? ' rewind with tokeninit() == .T. ? ------> ' + ltoc( tokeninit() ) ? ' tokenend() ? -------------------------> ' + ltoc( tokenend() ) - WHILE( !tokenend() ) + WHILE ! tokenend() ? ' start & end with tokenat(.F./.T.)-----> ' + Str( tokenat() ) + ' ' + Str( tokenat( .T. ) ) tokennext( @cStr1 ) ? ' tokenend() ? -------------------------> ' + ltoc( tokenend() ) @@ -139,7 +139,7 @@ PROCEDURE Main() tokeninit() ? ' tokennum() == 6 ? ----------------------> ' + Str( tokennum() ) ? ' tokenend() ? -------------------------> ' + ltoc( tokenend() ) - WHILE !tokenend() + WHILE ! tokenend() ? ' tokennext( @cStr1 ) -----------------> "' + tokennext( @cStr1 ) + '"' ? ' tokenend() ? -------------------------> ' + ltoc( tokenend() ) ENDDO @@ -159,7 +159,7 @@ PROCEDURE Main() ? ' tokennum( @cTE2 ) == 4 ? --------------------> ' + Str( tokennum( @cTE2 ) ) ? ' tokenend( @cTE1 ) ? ---------------------> ' + ltoc( tokenend( @cTE1 ) ) ? ' tokenend( @cTE2 ) ? ---------------------> ' + ltoc( tokenend( @cTE2 ) ) - WHILE !tokenend( @cTE1 ) .AND. !tokenend( @cTE2 ) + WHILE ! tokenend( @cTE1 ) .AND. ! tokenend( @cTE2 ) ? ' next train at ' + tokennext( cStr4,, @cTE1 ) + ":" + tokennext( cStr5,, @cTE2 ) ? ' compiled with tokennext( cStr4,, @cTE1 ) + ":" + tokennext( cStr5,, @cTE2 )' ? ' tokenend( @cTE1 ) ? ---------------------> ' + ltoc( tokenend( @cTE1 ) ) diff --git a/harbour/contrib/hbhttpd/readme.txt b/harbour/contrib/hbhttpd/readme.txt index 3a1ff30cfc..f8d783e36b 100644 --- a/harbour/contrib/hbhttpd/readme.txt +++ b/harbour/contrib/hbhttpd/readme.txt @@ -177,10 +177,10 @@ some framework/toolkit on top of basic uhttp server to allow a quick application development. UWidgets is used for this purpose. It allows to use some objects (browse, etc.) instead of plain: UWrite('') - DO WHILE ! EOF() - UWrite('') - DBSKIP() + DO WHILE ! Eof() + UWrite( '' ) + dbSkip() ENDDO UWrite('
' + FIELD->NAME + '' + - STR(FIELD->AGE) + '
' + FIELD->NAME + '' + + Str( FIELD->AGE ) + '
') @@ -206,16 +206,16 @@ event/method. Handler has a structure: STATIC FUNC proc_handler(cMethod) IF cMethod == "INIT" - // This code is executed on entering URL (first call to this URL) - // Here we open databases used to process queries + // This code is executed on entering URL (first call to this URL) + // Here we open databases used to process queries ELSEIF cMethod == "POST" - // Process HTTP POST request + // Process HTTP POST request ELSEIF cMethod == "GET" - // Process HTTP GET request + // Process HTTP GET request ELSEIF cMethod == "EXIT" - // This code is executed on leaving URL (before first call to - // another URL) - // Here we close databases opened in INIT method, etc. + // This code is executed on leaving URL (before first call to + // another URL) + // Here we close databases opened in INIT method, etc. ENDIF RETURN .T. @@ -236,7 +236,7 @@ GUI applications to web easier. The widgets are created on INIT method. The main widget is UWMain object. Creation of widgets is done using a function following Clipper convention: New(). So, - oM := UWMainNew() + oM := UWMainNew() creates a main widget of web page. This main widget acts as a layout/container in for example, GTK+ library. It has :Add() method and other widgets can be included inside of it. Ex., @@ -263,16 +263,16 @@ methods are called only after you request of new page. Ex., GET request "items" executes: - page_items("INIT") - page_items("GET") + page_items( "INIT" ) + page_items( "GET" ) Next GET request "items" executes: - page_items("GET") + page_items( "GET" ) If you issue a GET "account" request, it will execute: - page_items("EXIT") - page_account("INIT") - page_account("GET") + page_items( "EXIT" ) + page_account( "INIT" ) + page_account( "GET" ) A tree structure of URL is transfered into page handles INIT, EXIT logic. It helps make some feeling of modal structure of handler. I call @@ -280,7 +280,7 @@ it "modal" because of idea how event are processed in event handlers of modal dialogs. Let's have event handler function items_handler() for items dialog, and items_edit_handler() function for item_edit dialog. - PROC items_handler() + PROCEDURE items_handler() ... IF event = "edit button pressed" @@ -290,7 +290,7 @@ items dialog, and items_edit_handler() function for item_edit dialog. destroy_dialog( dialog ) ENDIF ... - RETURN + RETURN during process_event_loop() events are processed inside items_edit_handler() function, and this event handler can access @@ -300,23 +300,23 @@ The similar effect was tried to reach in page hadlers. Let's continue our sample (last query was "account"). GET request for "items" executes: - page_account("EXIT") - page_items("INIT") - page_items("GET") + page_account( "EXIT" ) + page_items( "INIT" ) + page_items( "GET" ) GET request for "items/edit" executes: - page_items_edit("INIT") // no page_items("EXIT") !!! - page_items_edit("GET") + page_items_edit( "INIT" ) // no page_items( "EXIT" ) !!! + page_items_edit( "GET" ) GET request for "account" executes: - page_items_edit("EXIT") - page_items("EXIT") - page_account("INIT") - page_account("GET") + page_items_edit( "EXIT" ) + page_items( "EXIT" ) + page_account( "INIT" ) + page_account( "GET" ) GET request for "account/edit" executes: - page_account_edit("INIT") - page_account_edit("GET") + page_account_edit( "INIT" ) + page_account_edit( "GET" ) etc... diff --git a/harbour/contrib/hbhttpd/widgets.prg b/harbour/contrib/hbhttpd/widgets.prg index 8a21dc07f2..3402c75326 100644 --- a/harbour/contrib/hbhttpd/widgets.prg +++ b/harbour/contrib/hbhttpd/widgets.prg @@ -353,7 +353,7 @@ FUNC UWBrowseNew() METHOD AddColumn( nID, cTitle, cField, lRaw ) CLASS UWBrowse - AAdd( Self:aColumns, { nID, cTitle, cField, !Empty( lRaw ) } ) + AAdd( Self:aColumns, { nID, cTitle, cField, ! Empty( lRaw ) } ) RETURN Self diff --git a/harbour/contrib/hbmisc/fileread.prg b/harbour/contrib/hbmisc/fileread.prg index cb21f984e8..9af452ae84 100644 --- a/harbour/contrib/hbmisc/fileread.prg +++ b/harbour/contrib/hbmisc/fileread.prg @@ -106,7 +106,7 @@ METHOD ReadLine() CLASS TFileRead ELSE // Is there a whole line in the readahead buffer? nPos := ::EOL_pos() - WHILE ( nPos <= 0 .OR. nPos > Len( ::cBuffer ) - 3 ) .AND. !::lEOF + WHILE ( nPos <= 0 .OR. nPos > Len( ::cBuffer ) - 3 ) .AND. ! ::lEOF // Either no or maybe, but there is possibly more to be read. // Maybe means that we found either a CR or an LF, but we don't // have enough characters to discriminate between the three types @@ -217,7 +217,7 @@ METHOD MoreToRead() CLASS TFileRead // Returns .T. if there is more to be read from either the file or the // readahead buffer. Only when both are exhausted is there no more to read. - RETURN !::lEOF .OR. !Empty( ::cBuffer ) + RETURN ! ::lEOF .OR. ! Empty( ::cBuffer ) METHOD Error() CLASS TFileRead diff --git a/harbour/contrib/hbmisc/hbedit.prg b/harbour/contrib/hbmisc/hbedit.prg index 63c74a2c0c..180c5aa799 100644 --- a/harbour/contrib/hbmisc/hbedit.prg +++ b/harbour/contrib/hbmisc/hbedit.prg @@ -468,7 +468,7 @@ STATIC PROCEDURE EditorKeys( oEdit, nKey ) NEXT CASE nKey == K_INS - oEdit[ E_INSERT ] := !oEdit[ E_INSERT ] + oEdit[ E_INSERT ] := ! oEdit[ E_INSERT ] Set( _SET_INSERT, oEdit[ E_INSERT ] ) SetCursor( iif( oEdit[ E_INSERT ], SC_NORMAL, SC_SPECIAL1 ) ) // SayInsert() diff --git a/harbour/contrib/hbmysql/diff-en.txt b/harbour/contrib/hbmysql/diff-en.txt index 077f405fc8..b148678298 100644 --- a/harbour/contrib/hbmysql/diff-en.txt +++ b/harbour/contrib/hbmysql/diff-en.txt @@ -55,28 +55,28 @@ Class TMySQLQuery ------------------------------------------- - Method TMySQLQuery:Bof() Change in definition to reproduce Clipper behaviour - BOF() true is applied when is tryed an movement before of first logical record, + Bof() true is applied when is tryed an movement before of first logical record, and must not be used to indicate record pointer is placed on record 1 Previous definition cause processes like this: - WHILE ! oQuery:BOF() - ... - oQuery:SKIP(-1) + WHILE ! oQuery:Bof() + ... + oQuery:SKIP( -1 ) ENDD do not show record 1 With new definition this behaviour are corrected - Method TMySQLQuery:Eof() Change in definition to reproduce Clipper behaviour - EOF() true is applied when is tryed an movement beyond of last logical record, + Eof() true is applied when is tryed an movement beyond of last logical record, and must not be used to indicate record pointer is placed on last record Previous definition cause processes like this: - WHILE ! oQuery:EOF() - ... - oQuery:SKIP() - ENDD + WHILE ! oQuery:Eof() + ... + oQuery:SKIP() + ENDDO do not show last record With new definition this behaviour are corrected - With EOF() true, record pointer is placed in LASTREC()+1 + With Eof() true, record pointer is placed in LASTREC()+1 - TMySQLQuery:New() Application of TMySQLQuery:lBof, TMySQLQuery:lEof, TMySQLQuery:lFieldAsData, @@ -85,7 +85,7 @@ Class TMySQLQuery ------------------------------------------- - TMySQLQuery:Skip() Application of TMySQLQuery:lBof, TMySQLQuery:lEof to determinate movements before of first and beyond of last logical records - Only SKIP movement can set BOF() true + Only SKIP movement can set Bof() true - TMySQLQuery:Skip() Apply NIL for return. DBSKIP() return NIL @@ -94,7 +94,7 @@ Class TMySQLQuery ------------------------------------------- Application of TMySQLQuery:lBof, TMySQLQuery:lEof, TMySQLQuery:lFieldAsData, TMySQLQuery:aRow = TMySQLQuery:aRow is used in place of local variable aRow - = Default row is applied to TMySQLQuery:nCurRow, in place to move record pointer + = Default row is applied to TMySQLQuery:nCurRow, in place to move record pointer position = TMySQLQuery:lBof, TMySQLQuery:lEof are determinated TMySQLQuery:bof(): pointer is placed in row 1 @@ -124,18 +124,18 @@ Class TMySQLTable ------------------------------------------- - Method TMySQLTable:Update() = Parameters added: + lOldRecord: Use original values of record for locate it - + lRefresh: refresh query to MySQL server to update information + + lRefresh: refresh query to MySQL server to update information selected for Client program - Method TMySQLTable:Delete() = Parameters added: + lOldRecord: Use original values of record for locate it - + lRefresh: refresh query to MySQL server to update information + + lRefresh: refresh query to MySQL server to update information selected for Client program - Method TMySQLTable:Append() = Parameters added: - + lRefresh: refresh query to MySQL server to update information + + lRefresh: refresh query to MySQL server to update information selected for Client program - Method TMySQLTable:GetBlankRow() @@ -155,13 +155,13 @@ Class TMySQLTable ------------------------------------------- In case of lOldRecord application: * Using current row: Use values of TMySQLQuery:aOldValue * Using given row: Use values of TMySQLRow:aOriValue - Locating is based in matching of values of ALL fields, + Locating is based in matching of values of ALL fields, using original values of row WARNING: If there are more than one row matching in ALL fields, then all this rows with common values will be changed - This approach is applied to help in row locating when there are not indexes, - or primary key are not enought to determinate record unicity. + This approach is applied to help in row locating when there are not indexes, + or primary key are not enought to determinate record unicity. But, can not be guaranted record correspondence if there are many equals This is an alternative to use of TMySQLRow/TMySQLTable:MakePrimaryKeyWhere(), because this last is based in fields belonging to an primary key @@ -171,7 +171,7 @@ Class TMySQLTable ------------------------------------------- Is very convenient in case of information changes = Same record pointer is keep - + = For an given row, TMySQLRow:aOriValue is updated with current values of TMySQLRow:aRow @@ -182,13 +182,13 @@ Class TMySQLTable ------------------------------------------- In case of lOldRecord application: * Using current row: Use values of TMySQLQuery:aOldValue * Using given row: Use values of TMySQLRow:aOriValue - Locating is based in matching of values of ALL fields, + Locating is based in matching of values of ALL fields, using original values of row WARNING: If there are more than one row matching in ALL fields, then all this rows with common values will be changed - This approach is applied to help in row locating when there are not indexes, - or primary key are not enought to determinate record unicity. + This approach is applied to help in row locating when there are not indexes, + or primary key are not enought to determinate record unicity. But, can not be guaranted record correspondence if there are many equals This is an alternative to use of TMySQLRow/TMySQLTable:MakePrimaryKeyWhere(), because this last is based in fields belonging to an primary key @@ -198,7 +198,7 @@ Class TMySQLTable ------------------------------------------- Is very convenient in case of information changes = Same record pointer is keep - + = For an given row, TMySQLRow:aOriValue is updated with current values of TMySQLRow:aRow @@ -243,6 +243,5 @@ Class TMySQLTable ------------------------------------------- Program TSqlBrw.prg ************************************ - Skipper() - Modification of movement control in order to apply new definitions of + Modification of movement control in order to apply new definitions of TMySQLQuery:Bof() and TMySQLQuery:Eof() - diff --git a/harbour/contrib/hbmysql/diff-es.txt b/harbour/contrib/hbmysql/diff-es.txt index 39f35a746f..503e129c69 100644 --- a/harbour/contrib/hbmysql/diff-es.txt +++ b/harbour/contrib/hbmysql/diff-es.txt @@ -55,28 +55,28 @@ Clase TMySQLQuery ------------------------------------------- - Metodo TMySQLQuery:Bof() Cambio en la definicion para reproducir el comportamiento con Clipper - BOF() verdadero se aplica cuando se intenta ir antes del primer registro logico, + Bof() verdadero se aplica cuando se intenta ir antes del primer registro logico, y no debe usarse para indicar que el puntero esta en el registro 1 La definicion anterior causa que procesos como: - WHILE ! oQuery:BOF() - ... - oQuery:SKIP(-1) + WHILE ! oQuery:Bof() + ... + oQuery:SKIP( -1 ) ENDD no muestren el registro 1 Con la nueva definicion se corrige este comportamiento - Metodo TMySQLQuery:Eof() Cambio en la definicion para reproducir el comportamiento con Clipper - EOF() verdadero se aplica cuando se intenta ir despues del ultimo registro logico, + Eof() verdadero se aplica cuando se intenta ir despues del ultimo registro logico, y no debe usarse para indicar que el puntero esta en el ultimo registro La definicion anterior causa que procesos como: - WHILE ! oQuery:EOF() - ... - oQuery:SKIP() - ENDD + WHILE ! oQuery:Eof() + ... + oQuery:SKIP() + ENDDO no muestren el ultimo registro Con la nueva definicion se corrige este comportamiento - Con EOF() verdadero, el puntero de registro se ubica en LASTREC()+1 + Con Eof() verdadero, el puntero de registro se ubica en LASTREC()+1 - TMySQLQuery:New() Aplicacion de TMySQLQuery:lBof, TMySQLQuery:lEof, TMySQLQuery:lFieldAsData, @@ -85,7 +85,7 @@ Clase TMySQLQuery ------------------------------------------- - TMySQLQuery:Skip() Aplicacion de TMySQLQuery:lBof, TMySQLQuery:lEof para determinar movimientos antes del primer y despues del ultimo registros logicos - Solamente el movimiento con SKIP puede establecer BOF() verdadero + Solamente el movimiento con SKIP puede establecer Bof() verdadero - TMySQLQuery:Skip() Aplicar NIL para retorno. DBSKIP() retorna NIL @@ -94,7 +94,7 @@ Clase TMySQLQuery ------------------------------------------- Aplicacion de TMySQLQuery:lBof, TMySQLQuery:lEof, TMySQLQuery:lFieldAsData, TMySQLQuery:aRow = Se usar TMySQLQuery:aRow en lugar de la variable local aRow - = La fila por omision se aplica a TMySQLQuery:nCurRow, en lugar de mover la + = La fila por omision se aplica a TMySQLQuery:nCurRow, en lugar de mover la posicion del puntero = Se determinan TMySQLQuery:lBof, TMySQLQuery:lEof TMySQLQuery:bof(): el puntero queda ubicado en fila 1 @@ -156,13 +156,13 @@ Clase TMySQLTable ------------------------------------------- En caso de aplicar lOldRecord: * Usando fila actual: Utiliza los valores TMySQLQuery:aOldValue * Usando fila proporcionada: Utiliza los valores TMySQLRow:aOriValue - La localizacion se basa en la coincidencia de valores de TODOS los campos, + La localizacion se basa en la coincidencia de valores de TODOS los campos, usando los valores originales de la fila ADVERTENCIA: Si hay mas de una fila que coincida en TODOS los campos, entonces todas estas filas con valores comunes seran cambiadas Se aplico esta aproximacion para auxiliar en la localizacion de filas cuando - no existen indices, o la llave primaria es insuficiente para determinar la + no existen indices, o la llave primaria es insuficiente para determinar la unicidad del registro. Sin embargo, no se puede garantizar la correspondencia del registro si existen varios iguales Es una alternativa al uso de TMySQLRow/TMySQLTable:MakePrimaryKeyWhere(), ya que @@ -173,7 +173,7 @@ Clase TMySQLTable ------------------------------------------- para el programa Cliente. Es muy conveniente en caso de modificacion de informacion = Se mantiene el mismo apuntador de registro - + = Para una fila proporcionada, se actualiza TMySQLRow:aOriValue con los valores actuales de TMySQLRow:aRow @@ -190,7 +190,7 @@ Clase TMySQLTable ------------------------------------------- todas estas filas con valores comunes seran cambiadas Se aplico esta aproximacion para auxiliar en la localizacion de filas cuando - no existen indices, o la llave primaria es insuficiente para determinar la + no existen indices, o la llave primaria es insuficiente para determinar la unicidad del registro. Sin embargo, no se puede garantizar la correspondencia del registro si existen varios iguales Es una alternativa al uso de TMySQLRow/TMySQLTable:MakePrimaryKeyWhere(), ya que @@ -201,7 +201,7 @@ Clase TMySQLTable ------------------------------------------- para el programa Cliente. Es muy conveniente en caso de modificacion de informacion = Se mantiene el mismo apuntador de registro - + = Para una fila proporcionada, se actualiza TMySQLRow:aOriValue con los valores actuales de TMySQLRow:aRow @@ -216,10 +216,10 @@ Clase TMySQLTable ------------------------------------------- = Se ubica el apuntador en TMySQLTable:lastrec()+1, antes de renovar la consulta Observacion: a pesar de reiteradas pruebas, no se pudo determinar en que manera establece el servidor MySQL la posicion de la fila insertada. Sin usar indices, en - ocasiones la insertaba adjunta al puntero actual, en tanto que en otras ocasiones + ocasiones la insertaba adjunta al puntero actual, en tanto que en otras ocasiones la insertaba en posiciones ubicadas a 1200 o 1300 filas con respecto al puntero actual, o al final de la tabla (alrededor de 2880 filas) - + = Para una fila proporcionada, se actualiza TMySQLRow:aOriValue con los valores actuales de TMySQLRow:aRow Ademas, se inicializan TMySQLRow:aDirty y TMySQLRow:aOldValue @@ -248,4 +248,3 @@ Programa TSqlBrw.prg ************************************ - Skipper() Modificacion del control de movimiento para aplicar las nuevas definiciones para TMySQLQuery:Bof() y TMySQLQuery:Eof() - diff --git a/harbour/contrib/hbmysql/tests/dbf2mysq.prg b/harbour/contrib/hbmysql/tests/dbf2mysq.prg index 857d2595dc..e6411e4649 100644 --- a/harbour/contrib/hbmysql/tests/dbf2mysq.prg +++ b/harbour/contrib/hbmysql/tests/dbf2mysq.prg @@ -145,7 +145,7 @@ PROCEDURE Main( ... ) QUIT ENDIF - DO WHILE ! dbffile->( EOF() ) .AND. Inkey() != K_ESC + DO WHILE ! dbffile->( Eof() ) .AND. Inkey() != K_ESC oRecord := oTable:GetBlankRow() diff --git a/harbour/contrib/hbmysql/tmysql.prg b/harbour/contrib/hbmysql/tmysql.prg index 1ff1ddde4f..6180b07f50 100644 --- a/harbour/contrib/hbmysql/tmysql.prg +++ b/harbour/contrib/hbmysql/tmysql.prg @@ -430,7 +430,7 @@ METHOD Skip( nRows ) CLASS TMySQLQuery // DAVID: ::nCurRow := Max( ::nCurRow + nRows, 1 ) IF ( ( ::RecNo() + nRows ) + 0 ) < 1 nRows := - ::RecNo() + 1 - // Clipper: only SKIP movement can set BOF() to .T. + // Clipper: only SKIP movement can set Bof() to .T. ::lBof := .T. // Try to skip before first record ENDIF ELSE @@ -445,7 +445,7 @@ METHOD Skip( nRows ) CLASS TMySQLQuery ::nCurRow := ::nCurRow + nRows // DAVID: maintain ::bof() true until next movement - // Clipper: only SKIP movement can set BOF() to .T. + // Clipper: only SKIP movement can set Bof() to .T. lbof := ::Bof() // mysql_data_seek( ::nResultHandle, ::nCurRow - 1 ) @@ -556,8 +556,8 @@ METHOD GetRow( nRow ) CLASS TMySQLQuery OTHERWISE - // DAVID: Alert( "Unknown type from SQL Server Field: " + hb_NToS( i ) + " is type " + hb_NToS( ::aFieldStruct[ i ][ MYSQL_FS_TYPE ] ) ) - // ? "Unknown type from SQL Server Field: " + hb_NToS( i ) + " is type " + hb_NToS( ::aFieldStruct[ i ][ MYSQL_FS_TYPE ] ) + // DAVID: Alert( "Unknown type from SQL Server Field: " + hb_ntos( i ) + " is type " + hb_ntos( ::aFieldStruct[ i ][ MYSQL_FS_TYPE ] ) ) + // ? "Unknown type from SQL Server Field: " + hb_ntos( i ) + " is type " + hb_ntos( ::aFieldStruct[ i ][ MYSQL_FS_TYPE ] ) ENDSWITCH @@ -1429,9 +1429,9 @@ METHOD CreateTable( cTable, aStruct, cPrimaryKey, cUniqueKey, cAuto ) CLASS TMyS CASE "N" /* IF aStruct[ i ][ DBS_DEC ] == 0 - ::cCreateQuery += aStruct[ i ][ DBS_NAME ] + " int(" + hb_NToS( aStruct[ i ][ DBS_LEN ] ) + ")" + Eval( cNN, aStruct[ i ] ) + iif( aStruct[ i ][ DBS_NAME ] == cPrimaryKey, " NOT NULL ", "" ) + iif( aStruct[ i ][ DBS_NAME ] == cAuto, " auto_increment ", "" ) + "," + ::cCreateQuery += aStruct[ i ][ DBS_NAME ] + " int(" + hb_ntos( aStruct[ i ][ DBS_LEN ] ) + ")" + Eval( cNN, aStruct[ i ] ) + iif( aStruct[ i ][ DBS_NAME ] == cPrimaryKey, " NOT NULL ", "" ) + iif( aStruct[ i ][ DBS_NAME ] == cAuto, " auto_increment ", "" ) + "," ELSE - ::cCreateQuery += aStruct[ i ][ DBS_NAME ] + " real(" + hb_NToS( aStruct[ i ][ DBS_LEN ] ) + "," + hb_NToS( aStruct[ i ][ DBS_DEC ] ) + ")" + Eval( cNN, aStruct[ i ] ) + "," + ::cCreateQuery += aStruct[ i ][ DBS_NAME ] + " real(" + hb_ntos( aStruct[ i ][ DBS_LEN ] ) + "," + hb_ntos( aStruct[ i ][ DBS_DEC ] ) + ")" + Eval( cNN, aStruct[ i ] ) + "," ENDIF */ IF aStruct[ i ][ DBS_DEC ] == 0 .AND. aStruct[ i ][ DBS_LEN ] <= 18 diff --git a/harbour/contrib/hbmysql/tsqlbrw.prg b/harbour/contrib/hbmysql/tsqlbrw.prg index 9fbf1ed23b..ea8f67ccda 100644 --- a/harbour/contrib/hbmysql/tsqlbrw.prg +++ b/harbour/contrib/hbmysql/tsqlbrw.prg @@ -272,7 +272,7 @@ METHOD EditField() CLASS TBrowseSQL ::oCurRow:FieldPut( oCol:nFieldNum, cMemo ) /* NOTE: To do in a better way */ - IF !::oQuery:Update( ::oCurRow ) + IF ! ::oQuery:Update( ::oCurRow ) Alert( Left( ::oQuery:Error(), 60 ) ) ENDIF ENDIF @@ -301,7 +301,7 @@ METHOD EditField() CLASS TBrowseSQL endif - IF !::oQuery:Refresh() + IF ! ::oQuery:Refresh() Alert( ::oQuery:Error() ) ENDIF @@ -337,7 +337,7 @@ METHOD BrowseTable( lCanEdit, aExitKeys ) CLASS TBrowseSQL DO WHILE lKeepGoing - DO WHILE !::Stabilize() .AND. NextKey() == 0 + DO WHILE ! ::Stabilize() .AND. NextKey() == 0 ENDDO nKey := Inkey( 0 ) @@ -399,7 +399,7 @@ METHOD BrowseTable( lCanEdit, aExitKeys ) CLASS TBrowseSQL IF ! ::oQuery:Delete( ::oCurRow ) Alert( "not deleted " + ::oQuery:Error() ) ENDIF - IF !::oQuery:Refresh() + IF ! ::oQuery:Refresh() Alert( ::oQuery:Error() ) ENDIF diff --git a/harbour/contrib/hbnetio/tests/netiot03.prg b/harbour/contrib/hbnetio/tests/netiot03.prg index 83596c1d90..6b615742f1 100644 --- a/harbour/contrib/hbnetio/tests/netiot03.prg +++ b/harbour/contrib/hbnetio/tests/netiot03.prg @@ -67,11 +67,11 @@ proc main() nSec := seconds() + 3 while seconds() < nSec xData := NETIO_GETDATA( nStream1 ) - if !empty( xData ) + if ! empty( xData ) ? hb_valToExp( xData ) endif xData := NETIO_GETDATA( nStream2 ) - if !empty( xData ) + if ! empty( xData ) ?? "", hb_valToExp( xData ) endif enddo @@ -81,8 +81,8 @@ proc main() wait lExists := netio_funcexec( "HB_DirExists", "./data" ) - ? "Directory './data'", iif( !lExists, "not exists", "exists" ) - if !lExists + ? "Directory './data'", iif( ! lExists, "not exists", "exists" ) + if ! lExists ? "Creating directory './data' ->", ; iif( netio_funcexec( "hb_DirCreate", "./data" ) == -1, "error", "OK" ) endif @@ -150,7 +150,7 @@ proc testdb( cName ) next ordSetFocus( 1 ) dbgotop() - while !eof() + while ! eof() if ! field->F1 == field->F2 ? "error at record:", recno() ? " ! '" + field->F1 + "' == '" + field->F2 + "'" @@ -178,7 +178,7 @@ return nStream static func rpc_timer( pConnSock, nStream ) while .t. - if !netio_srvSendItem( pConnSock, nStream, time() ) + if ! netio_srvSendItem( pConnSock, nStream, time() ) ? "CLOSED STREAM:", nStream exit endif @@ -189,7 +189,7 @@ return nil static func rpc_charstream( pConnSock, nStream ) local n := 0 while .t. - if !netio_srvSendData( pConnSock, nStream, chr( asc( "A" ) + n ) ) + if ! netio_srvSendData( pConnSock, nStream, chr( asc( "A" ) + n ) ) ? "CLOSED STREAM:", nStream exit endif diff --git a/harbour/contrib/hbnetio/tests/netiotst.prg b/harbour/contrib/hbnetio/tests/netiotst.prg index c728e544ed..2d618ea8a5 100644 --- a/harbour/contrib/hbnetio/tests/netiotst.prg +++ b/harbour/contrib/hbnetio/tests/netiotst.prg @@ -50,8 +50,8 @@ proc main() ? lExists := netio_funcexec( "HB_DirExists", "./data" ) - ? "Directory './data'", iif( !lExists, "not exists", "exists" ) - if !lExists + ? "Directory './data'", iif( ! lExists, "not exists", "exists" ) + if ! lExists ? "Creating directory './data' ->", ; iif( netio_funcexec( "hb_DirCreate", "./data" ) == -1, "error", "OK" ) endif @@ -116,7 +116,7 @@ proc testdb( cName ) next ordSetFocus( 1 ) dbgotop() - while !eof() + while ! eof() if ! field->F1 == field->F2 ? "error at record:", recno() ? " ! '" + field->F1 + "' == '" + field->F2 + "'" diff --git a/harbour/contrib/hbnf/doc/en/fttext.txt b/harbour/contrib/hbnf/doc/en/fttext.txt index 3c14857c2c..19bc5110d1 100644 --- a/harbour/contrib/hbnf/doc/en/fttext.txt +++ b/harbour/contrib/hbnf/doc/en/fttext.txt @@ -138,7 +138,7 @@ $EXAMPLES$ FT_FUSE( "text.c" ) // open text file - DO WHILE !FT_FEOF() + DO WHILE ! FT_FEOF() ? FT_FREADLN() // read thru file @@ -537,7 +537,7 @@ FT_FUSE( "config.sys" ) - DO WHILE Upper( FT_FREADLN() ) != "FILES=" .AND. !F_FEOF() + DO WHILE Upper( FT_FREADLN() ) != "FILES=" .AND. ! F_FEOF() FT_FSKIP() diff --git a/harbour/contrib/hbodbc/browodbc.prg b/harbour/contrib/hbodbc/browodbc.prg index a108de35ca..d7fcbb28ae 100644 --- a/harbour/contrib/hbodbc/browodbc.prg +++ b/harbour/contrib/hbodbc/browodbc.prg @@ -110,7 +110,7 @@ FUNCTION BrowseODBC( nTop, nLeft, nBottom, nRight, oDataSource ) DO WHILE ! lExit IF nKey == 0 - DO WHILE !oBrw:stabilize() .AND. NextKey() == 0 + DO WHILE ! oBrw:stabilize() .AND. NextKey() == 0 ENDDO ENDIF diff --git a/harbour/contrib/hbodbc/tests/odbcdemo.prg b/harbour/contrib/hbodbc/tests/odbcdemo.prg index cf310479f0..8b031ba7ee 100644 --- a/harbour/contrib/hbodbc/tests/odbcdemo.prg +++ b/harbour/contrib/hbodbc/tests/odbcdemo.prg @@ -69,7 +69,7 @@ PROCEDURE Main() PadR( dsFunctions:FieldByName( "City" ):FieldName, 40 ) ; COLOR "B/W" - DO WHILE !dsFunctions:Eof() + DO WHILE ! dsFunctions:Eof() ? " " + ; PadR( dsFunctions:FieldByName( "First" ):Value, 3 ), "|", ; PadR( dsFunctions:FieldByName( "Last" ):Value, 15 ), "|", ; diff --git a/harbour/contrib/hbodbc/todbc.prg b/harbour/contrib/hbodbc/todbc.prg index e5816946ab..5f2283df02 100644 --- a/harbour/contrib/hbodbc/todbc.prg +++ b/harbour/contrib/hbodbc/todbc.prg @@ -531,7 +531,7 @@ METHOD Next() CLASS TODBC IF ::nRecNo > ::nRecCount ::nRecCount := ::nRecNo ENDIF - ELSEIF nResult == SQL_NO_DATA_FOUND .AND. ::nRecNo == ::nRecCount // permit skip on last row, so that EOF() can work properly + ELSEIF nResult == SQL_NO_DATA_FOUND .AND. ::nRecNo == ::nRecCount // permit skip on last row, so that Eof() can work properly ::nRecno := ::nRecno + 1 ELSE // TODO: Error handling diff --git a/harbour/contrib/hbtip/ftpcli.prg b/harbour/contrib/hbtip/ftpcli.prg index 22ea9b24b3..90f843ba96 100644 --- a/harbour/contrib/hbtip/ftpcli.prg +++ b/harbour/contrib/hbtip/ftpcli.prg @@ -416,7 +416,7 @@ METHOD UserCommand( cCommand, lPasv, lReadPort, lGetReply ) CLASS tIPClientFTP hb_default( @lReadPort, .T. ) hb_default( @lGetReply, .F. ) - IF ::bUsePasv .AND. lPasv .AND. !::Pasv() + IF ::bUsePasv .AND. lPasv .AND. ! ::Pasv() RETURN .F. ENDIF diff --git a/harbour/contrib/hbwin/tests/olesrv1.prg b/harbour/contrib/hbwin/tests/olesrv1.prg index 682f5cdb56..00aac12485 100644 --- a/harbour/contrib/hbwin/tests/olesrv1.prg +++ b/harbour/contrib/hbwin/tests/olesrv1.prg @@ -134,7 +134,7 @@ METHOD Eval( cMethodName, ... ) CLASS OleNetioSrv BEGIN SEQUENCE WITH {| oErr | Break( oErr ) } SWITCH cMethodName CASE "CONNECT" - xRetVal := !Empty( ::pConn := NETIO_GETCONNECTION( ... ) ) + xRetVal := ! Empty( ::pConn := NETIO_GETCONNECTION( ... ) ) EXIT CASE "DISCONNECT" ::pConn := NIL diff --git a/harbour/contrib/rddads/ads.ch b/harbour/contrib/rddads/ads.ch index 271704631e..75f84158fb 100644 --- a/harbour/contrib/rddads/ads.ch +++ b/harbour/contrib/rddads/ads.ch @@ -309,14 +309,14 @@ => IF AdsIsServerLoaded( <(db)> ) > 0 ; ; dbUseArea( ; <.new.>, , <(db)>, <(a)>, ; - iif( <.sh.> .OR. <.ex.>, !<.ex.>, NIL ), <.ro.> ; + iif( <.sh.> .OR. <.ex.>, ! <.ex.>, NIL ), <.ro.> ; ) ; [; dbSetIndex( <(index1)> )] ; [; dbSetIndex( <(indexn)> )] ; ; ELSE ; ; dbUseArea( ; <.new.>, , <(db)>, <(a)>, ; - iif( <.sh.> .OR. <.ex.>, !<.ex.>, NIL ), <.ro.> ; + iif( <.sh.> .OR. <.ex.>, ! <.ex.>, NIL ), <.ro.> ; ) ; [; dbSetIndex( <(index1)> )] ; [; dbSetIndex( <(indexn)> )] ; diff --git a/harbour/contrib/rddsql/readme.txt b/harbour/contrib/rddsql/readme.txt index d91e1b5459..4792d7c336 100644 --- a/harbour/contrib/rddsql/readme.txt +++ b/harbour/contrib/rddsql/readme.txt @@ -22,10 +22,10 @@ emulated by creating additional table columns to store delete flag. Some record and file locks in DBF style. The idea of SQL query is also lost. If you do a simple loop - DBUSEAREA(, "select * from my_table") - DO WHILE ! EOF() - somefunc( FIELD->some_sql_field ) - DBSKIP() + dbUseArea(, "select * from my_table" ) + DO WHILE ! Eof() + somefunc( FIELD->some_sql_field ) + dbSkip() ENDDO RDD usualy will read SQL rows in portions, let's say 100 records per query. @@ -59,7 +59,7 @@ queries should be made explicitly by programmer. SSI gives access to query result via RDD interface, it does not tries to emulate DBF and be "plug-and-play" solution for DBF to SQL migration. If you do - DBUSEAREA(, "select * from my_table") + dbUseArea(, "select * from my_table") all query (it could contain millions of records!) will be cached. @@ -70,15 +70,15 @@ all query (it could contain millions of records!) will be cached. about additional DELETED column, _RECNO in the end of index expression, etc. Access of SQL database of other applications is sometimes not possible. -- It's query oriented. That means a simple DO WHILE ! EOF() loop will iterate +- It's query oriented. That means a simple DO WHILE ! Eof() loop will iterate each records once and only once. This is not true for "plug-and-play" SQL drivers, if indexing is used. Just like in the case of loop over DBF file. It is not guaranteed that all records are included! Yes! If key value of the first record in index is changed to be the last record in index during the - phase of record processing, DO WHILE ! EOF() loop will iterate only this + phase of record processing, DO WHILE ! Eof() loop will iterate only this single records even if the database contains millions of records. Your sould do FLOCK() on DBF to guarantee the records are not changed. Do you use FLOCK() - before readonly DO WHILE ! EOF() loops? :) + before readonly DO WHILE ! Eof() loops? :) diff --git a/harbour/contrib/sddodbc/tests/test2.prg b/harbour/contrib/sddodbc/tests/test2.prg index 2dd04ea23b..536ed415af 100644 --- a/harbour/contrib/sddodbc/tests/test2.prg +++ b/harbour/contrib/sddodbc/tests/test2.prg @@ -26,7 +26,7 @@ PROCEDURE Main() ? rddInfo( RDDI_EXECUTE, "INSERT INTO country values ('LTU', 'Lithuania', 3369600),('USA', 'United States of America', 305397000), ('POR', 'Portugal', 10617600), ('POL', 'Poland', 38115967), ('AUS', 'Australia', 21446187), ('FRA', 'France', 64473140), ('RUS', 'Russia', 141900000)" ) ? dbUseArea( .T., , "SELECT * FROM country", "country" ) ? "LASTREC:", LastRec() - DO WHILE ! EOF() + DO WHILE ! Eof() aI := Array( FCount() ) FOR nI := 1 TO FCount() aI[nI] := FieldGet( nI ) diff --git a/harbour/contrib/xhb/dbf2txt.c b/harbour/contrib/xhb/dbf2txt.c index 9be2d8b954..225eeabcfd 100644 --- a/harbour/contrib/xhb/dbf2txt.c +++ b/harbour/contrib/xhb/dbf2txt.c @@ -210,7 +210,7 @@ HB_FUNC( DBF2TEXT ) while( ( nCount == -1 || nCount > 0 ) && ( ! pWhile || hb_itemGetL( hb_vmEvalBlock( pWhile ) ) ) ) { - /* While !BOF() .AND. !EOF() */ + /* WHILE ! Bof() .AND. ! Eof() */ SELF_EOF( pArea, &bEof ); SELF_BOF( pArea, &bBof ); diff --git a/harbour/contrib/xhb/hbcompat.ch b/harbour/contrib/xhb/hbcompat.ch index 8afe774236..6ef3100ab3 100644 --- a/harbour/contrib/xhb/hbcompat.ch +++ b/harbour/contrib/xhb/hbcompat.ch @@ -57,10 +57,10 @@ #ifdef __XHARBOUR__ - #if defined( __PLATFORM__Windows ) .AND. !defined( __PLATFORM__WINDOWS ) + #if defined( __PLATFORM__Windows ) .AND. ! defined( __PLATFORM__WINDOWS ) #define __PLATFORM__WINDOWS #endif - #if defined( __PLATFORM__Linux ) .AND. !defined( __PLATFORM__LINUX ) + #if defined( __PLATFORM__Linux ) .AND. ! defined( __PLATFORM__LINUX ) #define __PLATFORM__LINUX #endif @@ -257,10 +257,10 @@ #else - #if defined( __PLATFORM__WINDOWS ) .AND. !defined( __PLATFORM__Windows ) + #if defined( __PLATFORM__WINDOWS ) .AND. ! defined( __PLATFORM__Windows ) #define __PLATFORM__Windows #endif - #if defined( __PLATFORM__LINUX ) .AND. !defined( __PLATFORM__Linux ) + #if defined( __PLATFORM__LINUX ) .AND. ! defined( __PLATFORM__Linux ) #define __PLATFORM__Linux #endif @@ -275,27 +275,27 @@ #xtranslate MaxRow(.T.) => hb_gtInfo( HB_GTI_VIEWPORTHEIGHT ) #xtranslate MaxCol(.T.) => hb_gtInfo( HB_GTI_VIEWPORTWIDTH ) - #xtranslate NextKey([]) => hb_keyNext() + #xtranslate NextKey( [] ) => hb_keyNext( ) - #xtranslate Str(,[],[],) => iif(, hb_NToS(), Str()) + #xtranslate Str(,[],[],) => iif( , hb_ntos( ), Str( ) ) #xuntranslate NetName( => #xuntranslate MemoWrit( => - #xtranslate NetName() => iif( HB_ISNUMERIC( ) .AND. == 1, hb_UserName(), NetName() ) - #xtranslate MemoWrit(,,) => iif( HB_ISLOGICAL( ) .AND. ! , hb_MemoWrit(,), MemoWrit(,) ) + #xtranslate NetName( ) => iif( HB_ISNUMERIC( ) .AND. == 1, hb_UserName(), NetName() ) + #xtranslate MemoWrit( , , ) => iif( HB_ISLOGICAL( ) .AND. ! , hb_MemoWrit( , ), MemoWrit( , ) ) #xuntranslate AIns( => #xuntranslate ADel( => - #xtranslate AIns(,,[]) => hb_AIns(,,) - #xtranslate ADel(,,) => hb_ADel(,,) + #xtranslate AIns(,,[]) => hb_AIns( , , ) + #xtranslate ADel(,,) => hb_ADel( , , ) - #xtranslate AScan(,,[],[],) => hb_AScan(,,,,) - #xtranslate At(,,[]) => hb_At(,,) + #xtranslate AScan(,,[],[],) => hb_AScan( , , , , ) + #xtranslate At(,,[]) => hb_At( , , ) - #xtranslate GetEnv([]) => hb_GetEnv() - #xtranslate SetKey([]) => hb_SetKey() + #xtranslate GetEnv([]) => hb_GetEnv( ) + #xtranslate SetKey([]) => hb_SetKey( ) /* TEXT INTO */ #xcommand TEXT INTO => #pragma __text|+=%s+hb_eol();:="" @@ -342,67 +342,67 @@ /* These also have wrapper function in xhb lib */ - #xtranslate gtSetClipboard() => hb_gtInfo( HB_GTI_CLIPBOARDDATA, ) + #xtranslate gtSetClipboard( ) => hb_gtInfo( HB_GTI_CLIPBOARDDATA, ) #xtranslate gtGetClipboard() => hb_gtInfo( HB_GTI_CLIPBOARDDATA ) #xtranslate gtGetClipBoardSize() => Len( hb_gtInfo( HB_GTI_CLIPBOARDDATA ) ) #xtranslate gtPasteClipBoard() => hb_gtInfo( HB_GTI_CLIPBOARDPASTE ) #xtranslate gtProcessMessages() => NextKey() #xtranslate SetInkeyBeforeBlock([]) => hb_gtInfo( HB_GTI_INKEYREAD [, ] ) <-x-> #xtranslate SetInkeyAfterBlock([]) => hb_gtInfo( HB_GTI_INKEYFILTER [, ] ) <-x-> - #xtranslate gfxPrimitive([]) => hb_gfxPrimitive() - #xtranslate gfxText([]) => hb_gfxText() + #xtranslate gfxPrimitive([]) => hb_gfxPrimitive( ) + #xtranslate gfxText([]) => hb_gfxText( ) - #xtranslate hb_openProcess([]) => hb_processOpen() - #xtranslate hb_closeProcess([]) => hb_processClose() + #xtranslate hb_openProcess([]) => hb_processOpen( ) + #xtranslate hb_closeProcess([]) => hb_processClose( ) - #xtranslate hb_isregexstring([]) => hb_isregex() - #xtranslate methodName([]) => hb_methodName() - #xtranslate libLoad([]) => hb_libLoad() - #xtranslate libFree([]) => hb_libFree() - #xtranslate hb_checksum([]) => hb_adler32() - #xtranslate setLastKey([]) => hb_keySetLast() - #xtranslate CStr([]) => hb_CStr() - #xtranslate ValToPrgExp([]) => hb_valToExp() - #xtranslate SecondsSleep([]) => hb_idleSleep() - #xtranslate WildMatch([]) => hb_WildMatch() - #xtranslate hb_bitIsSet([]) => hb_bitTest() - #xtranslate hb_DeserialNext() => hb_Deserialize() - #xtranslate hb_funcptr() => __dynsn2sym() + #xtranslate hb_isregexstring([]) => hb_isregex( ) + #xtranslate methodName([]) => hb_methodName( ) + #xtranslate libLoad([]) => hb_libLoad( ) + #xtranslate libFree([]) => hb_libFree( ) + #xtranslate hb_checksum([]) => hb_adler32( ) + #xtranslate setLastKey([]) => hb_keySetLast( ) + #xtranslate CStr([]) => hb_CStr( ) + #xtranslate ValToPrgExp([]) => hb_valToExp( ) + #xtranslate SecondsSleep([]) => hb_idleSleep( ) + #xtranslate WildMatch([]) => hb_WildMatch( ) + #xtranslate hb_bitIsSet([]) => hb_bitTest( ) + #xtranslate hb_DeserialNext() => hb_Deserialize( ) + #xtranslate hb_funcptr() => __dynsn2sym( ) - #xtranslate HexToNum([]) => hb_HexToNum() - #xtranslate NumToHex([]) => hb_NumToHex() - #xtranslate HexToStr([]) => hb_HexToStr() - #xtranslate StrToHex([]) => hb_StrToHex() + #xtranslate HexToNum([]) => hb_HexToNum( ) + #xtranslate NumToHex([]) => hb_NumToHex( ) + #xtranslate HexToStr([]) => hb_HexToStr( ) + #xtranslate StrToHex([]) => hb_StrToHex( ) #xtranslate ISPOINTER( ) => hb_ISPOINTER( ) - #xtranslate hb_SetIniComment([]) => hb_IniSetComment() - #xtranslate hb_ReadIni([]) => hb_IniRead() - #xtranslate hb_WriteIni([]) => hb_IniWrite() + #xtranslate hb_SetIniComment([]) => hb_IniSetComment( ) + #xtranslate hb_ReadIni([]) => hb_IniRead( ) + #xtranslate hb_WriteIni([]) => hb_IniWrite( ) - #xtranslate DisableWaitLocks([]) => hb_DisableWaitLocks() + #xtranslate DisableWaitLocks([]) => hb_DisableWaitLocks( ) #xtranslate HBCONSOLELOCK() => hb_gtLock() #xtranslate HBCONSOLEUNLOCK() => hb_gtUnLock() - #xtranslate hb_CMDARGARGV([]) => hb_ARGV() + #xtranslate hb_CMDARGARGV([]) => hb_ARGV( ) - #xtranslate RAScan([]) => hb_RAScan() + #xtranslate RAScan([]) => hb_RAScan( ) - #xtranslate AsizeAlloc( [, ] ) => AFill() - #xtranslate ALenAlloc( [, ] ) => Len() + #xtranslate AsizeAlloc( [, ] ) => AFill( ) + #xtranslate ALenAlloc( [, ] ) => Len( ) - #xtranslate DateTime([]) => hb_DateTime() - #xtranslate Hour([]) => hb_Hour() - #xtranslate Minute([]) => hb_Minute() - #xtranslate TToS([]) => hb_TToS() - #xtranslate SToT([]) => hb_SToT() - #xtranslate TToC([]) => hb_TToC() - #xtranslate CToT([]) => hb_CToT() + #xtranslate DateTime([]) => hb_DateTime( ) + #xtranslate Hour([]) => hb_Hour( ) + #xtranslate Minute([]) => hb_Minute( ) + #xtranslate TToS([]) => hb_TToS( ) + #xtranslate SToT([]) => hb_SToT( ) + #xtranslate TToC([]) => hb_TToC( ) + #xtranslate CToT([]) => hb_CToT( ) - #xtranslate i18n() => hb_i18n_gettext() + #xtranslate i18n( ) => hb_i18n_gettext( ) - #xtranslate hb_SetCodepage([]) => hb_cdpSelect( ) + #xtranslate hb_SetCodepage( [] ) => hb_cdpSelect( ) /* MT functions */ #xtranslate hb_MultiThread() => hb_mtvm() @@ -470,38 +470,38 @@ /* hb_ThreadCountStacks() */ /* Hash item functions */ - #xtranslate HASH([]) => hb_HASH() - #xtranslate HHASKEY([]) => hb_HHASKEY() - #xtranslate HGETPOS([]) => hb_HPOS() - #xtranslate HGET([]) => hb_HGET() - #xtranslate HSET([]) => hb_HSET() - #xtranslate HDEL([]) => hb_HDEL() - #xtranslate HGETKEYAT([]) => hb_HKEYAT() - #xtranslate HGETVALUEAT([]) => hb_HVALUEAT() - #xtranslate HSETVALUEAT([]) => hb_HVALUEAT() - #xtranslate HGETPAIRAT([]) => hb_HPAIRAT() - #xtranslate HDELAT([]) => hb_HDELAT() - #xtranslate HGETKEYS([]) => hb_HKEYS() - #xtranslate HGETVALUES([]) => hb_HVALUES() - #xtranslate HFILL([]) => hb_HFILL() - #xtranslate HCLONE([]) => hb_HCLONE() - #xtranslate HCOPY([]) => hb_HCOPY() - #xtranslate HMERGE([]) => hb_HMERGE() - #xtranslate HEVAL([]) => hb_HEVAL() - #xtranslate HSCAN([]) => hb_HSCAN() - #xtranslate HSETCASEMATCH([]) => hb_HSETCASEMATCH() - #xtranslate HGETCASEMATCH([]) => hb_HCASEMATCH() - #xtranslate HSETAUTOADD([]) => hb_HSETAUTOADD() - #xtranslate HGETAUTOADD([]) => hb_HAUTOADD() - #xtranslate HALLOCATE([]) => hb_HALLOCATE() - #xtranslate HDEFAULT([]) => hb_HDEFAULT() + #xtranslate HASH([]) => hb_HASH( ) + #xtranslate HHASKEY([]) => hb_HHASKEY( ) + #xtranslate HGETPOS([]) => hb_HPOS( ) + #xtranslate HGET([]) => hb_HGET( ) + #xtranslate HSET([]) => hb_HSET( ) + #xtranslate HDEL([]) => hb_HDEL( ) + #xtranslate HGETKEYAT([]) => hb_HKEYAT( ) + #xtranslate HGETVALUEAT([]) => hb_HVALUEAT( ) + #xtranslate HSETVALUEAT([]) => hb_HVALUEAT( ) + #xtranslate HGETPAIRAT([]) => hb_HPAIRAT( ) + #xtranslate HDELAT([]) => hb_HDELAT( ) + #xtranslate HGETKEYS([]) => hb_HKEYS( ) + #xtranslate HGETVALUES([]) => hb_HVALUES( ) + #xtranslate HFILL([]) => hb_HFILL( ) + #xtranslate HCLONE([]) => hb_HCLONE( ) + #xtranslate HCOPY([]) => hb_HCOPY( ) + #xtranslate HMERGE([]) => hb_HMERGE( ) + #xtranslate HEVAL([]) => hb_HEVAL( ) + #xtranslate HSCAN([]) => hb_HSCAN( ) + #xtranslate HSETCASEMATCH([]) => hb_HSETCASEMATCH( ) + #xtranslate HGETCASEMATCH([]) => hb_HCASEMATCH( ) + #xtranslate HSETAUTOADD([]) => hb_HSETAUTOADD( ) + #xtranslate HGETAUTOADD([]) => hb_HAUTOADD( ) + #xtranslate HALLOCATE([]) => hb_HALLOCATE( ) + #xtranslate HDEFAULT([]) => hb_HDEFAULT( ) #xtranslate HSETPARTITION([]) => /* Associative hash array functions */ - #xtranslate HAAGETKEYAT([]) => hb_HKEYAT() - #xtranslate HAAGETVALUEAT([]) => hb_HVALUEAT() - #xtranslate HAADELAT([]) => hb_HDELAT() - #xtranslate HAAGETPOS([]) => hb_HPOS() + #xtranslate HAAGETKEYAT([]) => hb_HKEYAT( ) + #xtranslate HAAGETVALUEAT([]) => hb_HVALUEAT( ) + #xtranslate HAADELAT([]) => hb_HDELAT( ) + #xtranslate HAAGETPOS([]) => hb_HPOS( ) #xtranslate HAAGETREALPOS(,) => iif( HB_ISNUMERIC( ) .AND. >= 1 .AND. ; int( ) <= len( ), int( ), 0 ) #xtranslate HGETVAAPOS() => {| h | ;; @@ -510,56 +510,56 @@ v := v:__enumIndex() ;; next ;; return a ; }:eval( ) - #xtranslate HGETAACOMPATIBILITY() => hb_HKEEPORDER() + #xtranslate HGETAACOMPATIBILITY() => hb_HKEEPORDER( ) #xtranslate HSETAACOMPATIBILITY([]) => {| h | ;; hb_HKEEPORDER( h ) ;; return .T. ; }:eval( ) /* Inet functions */ - #xtranslate INETINIT([]) => hb_INETINIT() - #xtranslate INETCLEANUP([]) => hb_INETCLEANUP() - #xtranslate INETCREATE([]) => hb_INETCREATE() - #xtranslate INETCLOSE([]) => hb_INETCLOSE() - #xtranslate INETFD([]) => hb_INETFD() - #xtranslate INETSTATUS([]) => hb_INETSTATUS() - #xtranslate INETERRORCODE([]) => hb_INETERRORCODE() - #xtranslate INETERRORDESC([]) => hb_INETERRORDESC() - #xtranslate INETCLEARERROR([]) => hb_INETCLEARERROR() - #xtranslate INETCOUNT([]) => hb_INETCOUNT() - #xtranslate INETADDRESS([]) => hb_INETADDRESS() - #xtranslate INETPORT([]) => hb_INETPORT() - #xtranslate INETSETTIMEOUT([]) => hb_INETTIMEOUT() - #xtranslate INETGETTIMEOUT([]) => hb_INETTIMEOUT() - #xtranslate INETCLEARTIMEOUT([]) => hb_INETCLEARTIMEOUT() - #xtranslate INETSETTIMELIMIT([]) => hb_INETTIMELIMIT() - #xtranslate INETGETTIMELIMIT([]) => hb_INETTIMELIMIT() - #xtranslate INETCLEARTIMELIMIT([]) => hb_INETCLEARTIMELIMIT() - #xtranslate INETSETPERIODCALLBACK([]) => hb_INETPERIODCALLBACK() - #xtranslate INETGETPERIODCALLBACK([]) => hb_INETPERIODCALLBACK() - #xtranslate INETCLEARPERIODCALLBACK([]) => hb_INETCLEARPERIODCALLBACK() - #xtranslate INETRECV([]) => hb_INETRECV() - #xtranslate INETRECVALL([]) => hb_INETRECVALL() - #xtranslate INETRECVLINE([]) => hb_INETRECVLINE() - #xtranslate INETRECVENDBLOCK([]) => hb_INETRECVENDBLOCK() - #xtranslate INETDATAREADY([]) => hb_INETDATAREADY() - #xtranslate INETSEND([]) => hb_INETSEND() - #xtranslate INETSENDALL([]) => hb_INETSENDALL() - #xtranslate INETGETHOSTS([]) => hb_INETGETHOSTS() - #xtranslate INETGETALIAS([]) => hb_INETGETALIAS() - #xtranslate INETSERVER([]) => hb_INETSERVER() - #xtranslate INETACCEPT([]) => hb_INETACCEPT() - #xtranslate INETCONNECT([]) => hb_INETCONNECT() - #xtranslate INETCONNECTIP([]) => hb_INETCONNECTIP() - #xtranslate INETDGRAMBIND([]) => hb_INETDGRAMBIND() - #xtranslate INETDGRAM([]) => hb_INETDGRAM() - #xtranslate INETDGRAMSEND([]) => hb_INETDGRAMSEND() - #xtranslate INETDGRAMRECV([]) => hb_INETDGRAMRECV() - #xtranslate INETCRLF([]) => hb_INETCRLF() - #xtranslate INETISSOCKET([]) => hb_INETISSOCKET() + #xtranslate INETINIT([]) => hb_INETINIT( ) + #xtranslate INETCLEANUP([]) => hb_INETCLEANUP( ) + #xtranslate INETCREATE([]) => hb_INETCREATE( ) + #xtranslate INETCLOSE([]) => hb_INETCLOSE( ) + #xtranslate INETFD([]) => hb_INETFD( ) + #xtranslate INETSTATUS([]) => hb_INETSTATUS( ) + #xtranslate INETERRORCODE([]) => hb_INETERRORCODE( ) + #xtranslate INETERRORDESC([]) => hb_INETERRORDESC( ) + #xtranslate INETCLEARERROR([]) => hb_INETCLEARERROR( ) + #xtranslate INETCOUNT([]) => hb_INETCOUNT( ) + #xtranslate INETADDRESS([]) => hb_INETADDRESS( ) + #xtranslate INETPORT([]) => hb_INETPORT( ) + #xtranslate INETSETTIMEOUT([]) => hb_INETTIMEOUT( ) + #xtranslate INETGETTIMEOUT([]) => hb_INETTIMEOUT( ) + #xtranslate INETCLEARTIMEOUT([]) => hb_INETCLEARTIMEOUT( ) + #xtranslate INETSETTIMELIMIT([]) => hb_INETTIMELIMIT( ) + #xtranslate INETGETTIMELIMIT([]) => hb_INETTIMELIMIT( ) + #xtranslate INETCLEARTIMELIMIT([]) => hb_INETCLEARTIMELIMIT( ) + #xtranslate INETSETPERIODCALLBACK([]) => hb_INETPERIODCALLBACK( ) + #xtranslate INETGETPERIODCALLBACK([]) => hb_INETPERIODCALLBACK( ) + #xtranslate INETCLEARPERIODCALLBACK([]) => hb_INETCLEARPERIODCALLBACK( ) + #xtranslate INETRECV([]) => hb_INETRECV( ) + #xtranslate INETRECVALL([]) => hb_INETRECVALL( ) + #xtranslate INETRECVLINE([]) => hb_INETRECVLINE( ) + #xtranslate INETRECVENDBLOCK([]) => hb_INETRECVENDBLOCK( ) + #xtranslate INETDATAREADY([]) => hb_INETDATAREADY( ) + #xtranslate INETSEND([]) => hb_INETSEND( ) + #xtranslate INETSENDALL([]) => hb_INETSENDALL( ) + #xtranslate INETGETHOSTS([]) => hb_INETGETHOSTS( ) + #xtranslate INETGETALIAS([]) => hb_INETGETALIAS( ) + #xtranslate INETSERVER([]) => hb_INETSERVER( ) + #xtranslate INETACCEPT([]) => hb_INETACCEPT( ) + #xtranslate INETCONNECT([]) => hb_INETCONNECT( ) + #xtranslate INETCONNECTIP([]) => hb_INETCONNECTIP( ) + #xtranslate INETDGRAMBIND([]) => hb_INETDGRAMBIND( ) + #xtranslate INETDGRAM([]) => hb_INETDGRAM( ) + #xtranslate INETDGRAMSEND([]) => hb_INETDGRAMSEND( ) + #xtranslate INETDGRAMRECV([]) => hb_INETDGRAMRECV( ) + #xtranslate INETCRLF([]) => hb_INETCRLF( ) + #xtranslate INETISSOCKET([]) => hb_INETISSOCKET( ) #xtranslate INETDESTROY([]) => iif( HB_INETISSOCKET( ), hb_INETCLOSE( ), ) /* THROW => generate error */ - #xtranslate THROW() => (Eval(ErrorBlock(), ), Break()) + #xtranslate THROW( ) => ( Eval( ErrorBlock(), ), Break( ) ) #endif diff --git a/harbour/contrib/xhb/hblog.prg b/harbour/contrib/xhb/hblog.prg index aa311c3320..d0672e5233 100644 --- a/harbour/contrib/xhb/hblog.prg +++ b/harbour/contrib/xhb/hblog.prg @@ -631,8 +631,8 @@ METHOD New( nLevel, cDBFName, cIndexName, aStruct, cDriver ) CLASS HB_LogDbf IF Empty( cExt ) cExt := "dbf" ENDIF - ::cDBFName := iif( !Empty( cDrive ), cDrive + ":\", "" ) + ; - iif( !Empty( cPath ), cPath + "\", "" ) + ; + ::cDBFName := iif( ! Empty( cDrive ), cDrive + ":\", "" ) + ; + iif( ! Empty( cPath ), cPath + "\", "" ) + ; cName + cExt // __OutDebug( "::cDBFName", ::cDBFName ) ENDIF @@ -642,8 +642,8 @@ METHOD New( nLevel, cDBFName, cIndexName, aStruct, cDriver ) CLASS HB_LogDbf IF Empty( cExt ) cExt := "cdx" ENDIF - ::cIndexName := iif( !Empty( cDrive ), cDrive + ":\", "" ) + ; - iif( !Empty( cPath ), cPath + "\", "" ) + ; + ::cIndexName := iif( ! Empty( cDrive ), cDrive + ":\", "" ) + ; + iif( ! Empty( cPath ), cPath + "\", "" ) + ; cName + cExt // __OutDebug( "::cCDXName", ::cCDXName ) ENDIF diff --git a/harbour/contrib/xhb/html.ch b/harbour/contrib/xhb/html.ch index 927a1e715a..719f6463c1 100644 --- a/harbour/contrib/xhb/html.ch +++ b/harbour/contrib/xhb/html.ch @@ -253,8 +253,8 @@ OF ; => ; :newTableCell( __HTML_ALING__ [], , , ; - , , , ; - , , !<.nowrap.>, ; + , , , ; + , , ! <.nowrap.>, ; , ,__HTML_ALING__ [], , , , ) @@ -274,7 +274,7 @@ => ; :newTableCell( __HTML_ALING__ [], , , ; , , , ; - , , !<.nowrap.>,; + , , ! <.nowrap.>, ; , ) @@ -307,7 +307,7 @@ => ; :SetFont( [<(cFont)>], [<.bold.>], ; [<.itl.>], [<.uln.>], ; - [], [],!<.lset.> ) + [], [], ! <.lset.> ) #xCommand START FONT [] ; @@ -321,7 +321,7 @@ => ; :StartFont( [<(cFont)>], [<.bold.>], ; [<.itl.>], [<.uln.>], ; - [], [] ,!<.lset.> ) + [], [], ! <.lset.> ) #xCommand FONTEND[] ; @@ -505,8 +505,8 @@ OF ; => ; :frame( [], [], ; - !<.brd.>, !<.res.>, [<.scr.>], ; - [], [], [], ; + ! <.brd.>, ! <.res.>, [<.scr.>], ; + [], [], [], ; __HTML_SCROLL__ [] ) #xCommand ENDSET => :EndSet() @@ -587,7 +587,7 @@ [ALIGN ] ; OF ; => ; - :iFrame( , , !<.brd.>, ; + :iFrame( , , ! <.brd.>, ; , , ; <.scr.>, , ; , ) diff --git a/harbour/contrib/xhb/tfile.prg b/harbour/contrib/xhb/tfile.prg index bd80f2a1d3..2ae900c0a4 100644 --- a/harbour/contrib/xhb/tfile.prg +++ b/harbour/contrib/xhb/tfile.prg @@ -352,7 +352,7 @@ METHOD GOTO( nLine ) CLASS TCgiFile RETURN nPos ENDIF - WHILE !::Eof() + WHILE ! ::Eof() ::ReadLine() @@ -385,7 +385,7 @@ METHOD SKIP( nLines ) CLASS TCgiFile ENDIF - WHILE !::Eof() + WHILE ! ::Eof() IF nCount == nLines EXIT @@ -419,7 +419,7 @@ METHOD PrevPage( nBytes ) CLASS TCgiFile RETURN "" ENDIF - IF !::Bof() + IF ! ::Bof() FSeek( ::Handle, - nBytes, FS_RELATIVE ) ::cPage := FReadStr( ::Handle, nBytes ) FSeek( ::Handle, - nBytes, FS_RELATIVE ) @@ -440,7 +440,7 @@ METHOD NextPage( nBytes ) CLASS TCgiFile RETURN "" ENDIF - IF !::Eof() + IF ! ::Eof() ::cPage := FReadStr( ::Handle, nBytes ) ::nPage++ ENDIF diff --git a/harbour/contrib/xhb/tframe.prg b/harbour/contrib/xhb/tframe.prg index 4a71f08faa..0717cff662 100644 --- a/harbour/contrib/xhb/tframe.prg +++ b/harbour/contrib/xhb/tframe.prg @@ -103,7 +103,7 @@ METHOD StartSet( aRows, aCols, onLoad, onUnload ) CLASS THtmlFrameSet cStr := CRLF() + " duedate ) ; + COPY TO overdue DELIMITED FOR ! Empty( accounts->duedate ) ; .AND. Date() - accounts->duedate > 30 // Import new customer records. USE CUSTOMER NEW diff --git a/harbour/doc/en/dbsdf.txt b/harbour/doc/en/dbsdf.txt index 0f4111bd55..60d97727e5 100644 --- a/harbour/doc/en/dbsdf.txt +++ b/harbour/doc/en/dbsdf.txt @@ -61,7 +61,7 @@ $EXAMPLES$ // Copy delinquent accounts into an SDF text file. USE ACCOUNTS NEW - COPY TO overdue SDF FOR !Empty( accounts->duedate ) ; + COPY TO overdue SDF FOR ! Empty( accounts->duedate ) ; .AND. Date() - accounts->duedate > 30 // Import new customer records. USE CUSTOMER NEW diff --git a/harbour/doc/en/rdddb.txt b/harbour/doc/en/rdddb.txt index 537f493d59..c7cd294356 100644 --- a/harbour/doc/en/rdddb.txt +++ b/harbour/doc/en/rdddb.txt @@ -874,7 +874,7 @@ true (.T.), and the value of EOF() wilI be a logical false (.F.). If no item is found. then the function will return a logical false, the value of FOUND( ) will be a logical false (.F.), and the value of - EOF( ) will be a logical true (.T.). + EOF() will be a logical true (.T.). This function always "rewinds" the database pointer and starts the search from the top of the file. diff --git a/harbour/doc/en/terminal.txt b/harbour/doc/en/terminal.txt index 60c909200f..ffe2ef74d4 100644 --- a/harbour/doc/en/terminal.txt +++ b/harbour/doc/en/terminal.txt @@ -744,7 +744,7 @@ USE Clientes NEW SET DEVICE TO PRINTER CurPos := 0 - WHILE !Eof() + WHILE ! Eof() ? Clientes->nome, Clientes->endereco Curpos++ IF Curpos > 59 diff --git a/harbour/extras/gtwvw/tests/wvt2wvw.ch b/harbour/extras/gtwvw/tests/wvt2wvw.ch index e4d29ed686..88c37da553 100644 --- a/harbour/extras/gtwvw/tests/wvt2wvw.ch +++ b/harbour/extras/gtwvw/tests/wvt2wvw.ch @@ -72,11 +72,11 @@ PART-2: WINDOW DEPENDENT (additional nWinNum parameter) Notes: nWinNum parameter passed as NIL will be translated by gtwvw into : - if !MainCoordMode + IF ! MainCoordMode Current Window - else + ELSE Topmost Window - endif + ENDIF Since gtwvt application can't be in MainCoordMode, the following approach makes these functions work on current window. @@ -149,9 +149,9 @@ PART-2: WINDOW DEPENDENT (additional nWinNum parameter) in gtwvw no pending rect is reflected as {y1,x1,y2,x2} where y1 > y2 or x1 > x2 thus we need some temporary var to check this exception */ -#xtranslate WVT_GETPAINTRECT ([]) => ( _wvwtemp_ := WVW_GETPAINTRECT (NIL [, ]) ; - , iif(_wvwtemp_\[1\] > _wvwtemp_\[3\] .or. _wvwtemp_\[2\] > _wvwtemp_\[4\], ; - {0,0,0,0}, _wvwtemp_ ) ) +#xtranslate WVT_GETPAINTRECT ([]) => ( _wvwtemp_ := WVW_GETPAINTRECT( NIL [, ]) ; + , iif(_wvwtemp_\[1\] > _wvwtemp_\[3\] .OR. _wvwtemp_\[2\] > _wvwtemp_\[4\], ; + { 0, 0, 0, 0 }, _wvwtemp_ ) ) #xtranslate WVT_SETPOINTER ([]) => WVW_SETPOINTER (NIL [, ]) #xtranslate WVT_DRAWPICTURE ([]) => WVW_DRAWPICTURE (NIL [, ]) @@ -243,13 +243,13 @@ PART-3: RESERVED FUNCTION NAMES ("callback" prg functions, called by gtwvw) Typically your WVT_xxx function will need adjustment like below: - function WVT_xxx(...) - local nOldWin := wvw_nsetcurwindow(nWinNum) //<-- add this + FUNCTION WVT_xxx(...) + LOCAL nOldWin := wvw_nsetcurwindow( nWinNum ) //<-- add this ...existing code... - wvw_nsetcurwindow(nOldWin) //<--add this - return NIL + wvw_nsetcurwindow( nOldWin ) //<--add this + RETURN NIL Although the above may be enough, each individual function may need careful review to make sure it follows gtwvw convention. For example, if you have multiple @@ -267,24 +267,24 @@ PART-3: RESERVED FUNCTION NAMES ("callback" prg functions, called by gtwvw) */ -#xtranslate FUNCTION WVT_PAINT([]) => FUNCTION WVW_PAINT(nWinNum [,]) -#xtranslate PROCEDURE WVT_PAINT([]) => PROCEDURE WVW_PAINT(nWinNum [,]) -#xtranslate WVT_PAINT([]) => WVW_PAINT(NIL [,]) +#xtranslate FUNCTION WVT_PAINT([]) => FUNCTION WVW_PAINT( nWinNum [,] ) +#xtranslate PROCEDURE WVT_PAINT([]) => PROCEDURE WVW_PAINT( nWinNum [,] ) +#xtranslate WVT_PAINT([]) => WVW_PAINT( NIL [,] ) -#xtranslate FUNCTION WVT_SETFOCUS([]) => FUNCTION WVW_SETFOCUS(nWinNum [,]) -#xtranslate PROCEDURE WVT_SETFOCUS([]) => PROCEDURE WVW_SETFOCUS(nWinNum [,]) -#xtranslate WVT_SETFOCUS([]) => WVW_SETFOCUS(NIL [,]) +#xtranslate FUNCTION WVT_SETFOCUS([]) => FUNCTION WVW_SETFOCUS( nWinNum [,] ) +#xtranslate PROCEDURE WVT_SETFOCUS([]) => PROCEDURE WVW_SETFOCUS( nWinNum [,] ) +#xtranslate WVT_SETFOCUS([]) => WVW_SETFOCUS( NIL [,] ) -#xtranslate FUNCTION WVT_KILLFOCUS([]) => FUNCTION WVW_KILLFOCUS(nWinNum [,]) -#xtranslate PROCEDURE WVT_KILLFOCUS([]) => PROCEDURE WVW_KILLFOCUS(nWinNum [,]) -#xtranslate WVT_KILLFOCUS([]) => WVW_KILLFOCUS(NIL [,]) +#xtranslate FUNCTION WVT_KILLFOCUS([]) => FUNCTION WVW_KILLFOCUS( nWinNum [,] ) +#xtranslate PROCEDURE WVT_KILLFOCUS([]) => PROCEDURE WVW_KILLFOCUS( nWinNum [,] ) +#xtranslate WVT_KILLFOCUS([]) => WVW_KILLFOCUS( NIL [,] ) -#xtranslate FUNCTION WVT_MOUSE([]) => FUNCTION WVW_MOUSE(nWinNum [,]) -#xtranslate PROCEDURE WVT_MOUSE([]) => PROCEDURE WVW_MOUSE(nWinNum [,]) -#xtranslate WVT_MOUSE([]) => WVW_MOUSE(NIL [,]) +#xtranslate FUNCTION WVT_MOUSE([]) => FUNCTION WVW_MOUSE( nWinNum [,] ) +#xtranslate PROCEDURE WVT_MOUSE([]) => PROCEDURE WVW_MOUSE( nWinNum [,] ) +#xtranslate WVT_MOUSE([]) => WVW_MOUSE( NIL [,] ) -#xtranslate FUNCTION WVT_TIMER() => FUNCTION WVW_TIMER(nWinNum, hWnd, message, wParam, lParam) -#xtranslate PROCEDURE WVT_TIMER() => PROCEDURE WVW_TIMER(nWinNum, hWnd, message, wParam, lParam) +#xtranslate FUNCTION WVT_TIMER() => FUNCTION WVW_TIMER( nWinNum, hWnd, message, wParam, lParam ) +#xtranslate PROCEDURE WVT_TIMER() => PROCEDURE WVW_TIMER( nWinNum, hWnd, message, wParam, lParam ) /* Currently WVT_TIMER is never called by GTWVT. There should never be any existing usage of this function. */ diff --git a/harbour/extras/httpsrv/cookie.prg b/harbour/extras/httpsrv/cookie.prg index d6ce265a0b..cdf1823321 100644 --- a/harbour/extras/httpsrv/cookie.prg +++ b/harbour/extras/httpsrv/cookie.prg @@ -75,7 +75,7 @@ CLASS uhttpd_Cookie METHOD DeleteAllCookies() METHOD GetCookie() METHOD IsCookie( cCookieName ) INLINE ::GetCookie( cCookieName ) != NIL - METHOD IsCookies() INLINE !Empty( ::aaCookieToSet ) + METHOD IsCookies() INLINE ! Empty( ::aaCookieToSet ) METHOD SetCookieDefaults() ENDCLASS diff --git a/harbour/extras/httpsrv/modules/tableservletdb.prg b/harbour/extras/httpsrv/modules/tableservletdb.prg index 88cf908b21..7568df9e16 100644 --- a/harbour/extras/httpsrv/modules/tableservletdb.prg +++ b/harbour/extras/httpsrv/modules/tableservletdb.prg @@ -183,7 +183,7 @@ METHOD READ() CLASS TableManager table->( dbGoTop() ) // n := 0 - DO WHILE table->( !Eof() ) // .AND. ++n < 50 + DO WHILE table->( ! Eof() ) // .AND. ++n < 50 hMap := { => } hMap[ "recno" ] := StrZero( table->( RecNo() ), 4 ) diff --git a/harbour/extras/rddado/adordd.ch b/harbour/extras/rddado/adordd.ch index 13b5629aa1..49b2d9399b 100644 --- a/harbour/extras/rddado/adordd.ch +++ b/harbour/extras/rddado/adordd.ch @@ -210,7 +210,7 @@ [ HB_AdoSetQuery( ) ; ] ; [ HB_AdoSetUser( ); HB_AdoSetPassword( ) ; ] ; dbUseArea( <.nw.>, , <(db)>, <(a)>, ; - if(<.sh.> .or. <.ex.>, !<.ex.>, NIL), <.ro.> [, ] ) ; + iif( <.sh.> .or. <.ex.>, ! <.ex.>, NIL), <.ro.> [, ] ) ; [; dbSetIndex( <(index1)> )] ; [; dbSetIndex( <(indexN)> )] diff --git a/harbour/extras/rddado/adordd.prg b/harbour/extras/rddado/adordd.prg index d613d663c8..349c770f87 100644 --- a/harbour/extras/rddado/adordd.prg +++ b/harbour/extras/rddado/adordd.prg @@ -695,14 +695,14 @@ STATIC FUNCTION ADO_ORDINFO( nWA, nIndex, aOrderInfo ) DO CASE CASE nIndex == DBOI_EXPRESSION - IF ! Empty( aWAData[ WA_CATALOG ] ) .AND. !Empty( aOrderInfo[ UR_ORI_TAG ] ) .AND. ; + IF ! Empty( aWAData[ WA_CATALOG ] ) .AND. ! Empty( aOrderInfo[ UR_ORI_TAG ] ) .AND. ; aOrderInfo[ UR_ORI_TAG ] < aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes:Count aOrderInfo[ UR_ORI_RESULT ] := aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes( aOrderInfo[ UR_ORI_TAG ] ):Name ELSE aOrderInfo[ UR_ORI_RESULT ] := "" ENDIF CASE nIndex == DBOI_NAME - IF ! Empty( aWAData[ WA_CATALOG ] ) .AND. !Empty( aOrderInfo[ UR_ORI_TAG ] ) .AND. ; + IF ! Empty( aWAData[ WA_CATALOG ] ) .AND. ! Empty( aOrderInfo[ UR_ORI_TAG ] ) .AND. ; aOrderInfo[ UR_ORI_TAG ] < aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes:Count aOrderInfo[ UR_ORI_RESULT ] := aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes( aOrderInfo[ UR_ORI_TAG ] ):Name ELSE diff --git a/harbour/include/assert.ch b/harbour/include/assert.ch index 18bc3a75b7..b8f12a89eb 100644 --- a/harbour/include/assert.ch +++ b/harbour/include/assert.ch @@ -65,7 +65,7 @@ IF !( ) ; ; OutStd( ; hb_eol() + ProcName( 0 ) + ; - "(" + hb_NToS( ProcLine() ) + ")" + ; + "(" + hb_ntos( ProcLine() ) + ")" + ; " Assertion failed: " + ; iif( <.msg.>, , <"exp"> ) ; ) ; diff --git a/harbour/include/hbsix.ch b/harbour/include/hbsix.ch index c219d2d492..15e431f2d7 100644 --- a/harbour/include/hbsix.ch +++ b/harbour/include/hbsix.ch @@ -83,7 +83,7 @@ [Sx_SetTrigger( TRIGGER_PENDING, , ); ] <-trig-> ; [Sx_SetPass( , 1, ); ] <-pass-> ; dbUseArea( <.nw.>, , <(db)>, <(a)>, ; - if(<.sh.> .or. <.ex.>, !<.ex.>, NIL), <.ro.> [, ] ) ; + iif(<.sh.> .or. <.ex.>, ! <.ex.>, NIL), <.ro.> [, ] ) ; [; dbSetIndex( <(index1)> )] ; [; dbSetIndex( <(indexN)> )] diff --git a/harbour/src/debug/dbgbrwsr.prg b/harbour/src/debug/dbgbrwsr.prg index 6101189dff..f879764071 100644 --- a/harbour/src/debug/dbgbrwsr.prg +++ b/harbour/src/debug/dbgbrwsr.prg @@ -148,7 +148,7 @@ METHOD MoveCursor( nSkip ) LOCAL nSkipped nSkipped := ::GoTo( ::rowPos + ::nFirstVisible - 1 + nSkip ) - IF !::hitBottom .OR. Abs( nSkipped ) > 0 + IF ! ::hitBottom .OR. Abs( nSkipped ) > 0 IF iif( nSkipped > 0, ::rowPos + nSkipped <= ::rowCount, ::rowPos + nSkipped >= 1 ) ::RefreshCurrent() ::rowPos += nSkipped @@ -165,12 +165,12 @@ METHOD ForceStable() LOCAL nRow, nCol, xData, oCol, nColX, nWid, aClr, nClr - IF !::lConfigured + IF ! ::lConfigured ::Configure() ENDIF DispBegin() FOR nRow := 1 TO ::rowCount - IF !::aRowState[ nRow ] + IF ! ::aRowState[ nRow ] ::GoTo( ::nFirstVisible + nRow - 1 ) IF ::hitBottom hb_DispOutAt( ::nTop + nRow - 1, ::nLeft, Space( ::nRight - ::nLeft + 1 ), ::aColorSpec[ 1 ] ) @@ -222,7 +222,7 @@ METHOD GoTo( nRow ) METHOD GoBottom() - DO WHILE !::hitBottom + DO WHILE ! ::hitBottom ::PageDown() ENDDO diff --git a/harbour/src/debug/dbgtinp.prg b/harbour/src/debug/dbgtinp.prg index 2347a55e33..199ded536b 100644 --- a/harbour/src/debug/dbgtinp.prg +++ b/harbour/src/debug/dbgtinp.prg @@ -126,7 +126,7 @@ METHOD newPos( nRow, nCol ) CLASS HbDbInput METHOD setFocus() CLASS HbDbInput - IF !::lFocus + IF ! ::lFocus ::lFocus := .T. ::display() ENDIF @@ -206,7 +206,7 @@ METHOD applyKey( nKey ) CLASS HbDbInput ::nPos := 1 EXIT CASE K_INS - Set( _SET_INSERT, !Set( _SET_INSERT ) ) + Set( _SET_INSERT, ! Set( _SET_INSERT ) ) EXIT OTHERWISE IF !( hb_keyChar( nKey ) == "" ) diff --git a/harbour/src/rdd/dbdelim.prg b/harbour/src/rdd/dbdelim.prg index e84368d18e..01800ccf86 100644 --- a/harbour/src/rdd/dbdelim.prg +++ b/harbour/src/rdd/dbdelim.prg @@ -85,7 +85,7 @@ FUNCTION __dbDelim( lExport, cFile, cDelimArg, aFields, bFor, bWhile, nNext, nRe ENDIF dbSelectArea( nSrcArea ) ELSE - IF !__dbOpenSDF( cFile, aStruct, cRDD, .T., "", cDelimArg ) + IF ! __dbOpenSDF( cFile, aStruct, cRDD, .T., "", cDelimArg ) RETURN .F. ENDIF nSrcArea := Select() diff --git a/harbour/src/rdd/dbjoin.prg b/harbour/src/rdd/dbjoin.prg index 545c077741..dd32b4f1b5 100644 --- a/harbour/src/rdd/dbjoin.prg +++ b/harbour/src/rdd/dbjoin.prg @@ -79,11 +79,11 @@ FUNCTION __dbJoin( cAlias, cFile, aFields, bFor, cRDD, nConnection, cCodePage ) dbSelectArea( nMaster ) dbGoTop() - DO WHILE !Eof() + DO WHILE ! Eof() dbSelectArea( nDetail ) dbGoTop() - DO WHILE !Eof() + DO WHILE ! Eof() dbSelectArea( nMaster ) IF Eval( bFor ) diff --git a/harbour/src/rdd/dbstrux.prg b/harbour/src/rdd/dbstrux.prg index d0eae4abe9..9621703eab 100644 --- a/harbour/src/rdd/dbstrux.prg +++ b/harbour/src/rdd/dbstrux.prg @@ -114,7 +114,7 @@ FUNCTION __dbCreate( cFileName, cFileFrom, cRDD, lNew, cAlias, cCodePage, nConne hb_FNameSplit( cFileName, NIL, @cAlias ) ENDIF - IF Used() .AND. !lNew + IF Used() .AND. ! lNew dbCloseArea() ENDIF diff --git a/harbour/src/rdd/dbupdat.prg b/harbour/src/rdd/dbupdat.prg index cfd2aad285..113c8b2932 100644 --- a/harbour/src/rdd/dbupdat.prg +++ b/harbour/src/rdd/dbupdat.prg @@ -65,7 +65,7 @@ FUNCTION __dbUpdate( cAlias, bKey, lRandom, bAssign ) dbSelectArea( cAlias ) dbGoTop() - DO WHILE !Eof() + DO WHILE ! Eof() xKey := Eval( bKey ) @@ -75,11 +75,11 @@ FUNCTION __dbUpdate( cAlias, bKey, lRandom, bAssign ) Eval( bAssign ) ENDIF ELSE - DO WHILE Eval( bKey ) < xKey .AND. !Eof() + DO WHILE Eval( bKey ) < xKey .AND. ! Eof() dbSkip() ENDDO - IF Eval( bKey ) == xKey .AND. !Eof() + IF Eval( bKey ) == xKey .AND. ! Eof() Eval( bAssign ) ENDIF ENDIF diff --git a/harbour/src/rdd/rddord.prg b/harbour/src/rdd/rddord.prg index 575a3717a2..d522f22cb9 100644 --- a/harbour/src/rdd/rddord.prg +++ b/harbour/src/rdd/rddord.prg @@ -68,7 +68,7 @@ FUNCTION dbReindex() PROCEDURE dbSetOrder( nOrderNum ) - IF HB_ISSTRING( nOrderNum ) .AND. !Empty( Val( nOrderNum ) ) + IF HB_ISSTRING( nOrderNum ) .AND. ! Empty( Val( nOrderNum ) ) nOrderNum := Val( nOrderNum ) ENDIF diff --git a/harbour/src/rtl/achoice.prg b/harbour/src/rtl/achoice.prg index 38d5f0d8f0..0d0ccfb4ba 100644 --- a/harbour/src/rtl/achoice.prg +++ b/harbour/src/rtl/achoice.prg @@ -93,7 +93,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo xSelect := NIL ENDIF - lUserFunc := !Empty( xUserFunc ) .AND. ValType( xUserFunc ) $ "CB" + lUserFunc := ! Empty( xUserFunc ) .AND. ValType( xUserFunc ) $ "CB" IF ! HB_ISARRAY( xSelect ) .AND. ! HB_ISLOGICAL( xSelect ) xSelect := .T. // Array or logical, what is selectable @@ -143,7 +143,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo IF lFinished .AND. lUserFunc Do( xUserFunc, nMode, nPos, nPos - nAtTop ) ENDIF - DO WHILE !lFinished + DO WHILE ! lFinished IF nMode != AC_GOTO .AND. nMode != AC_NOITEM nKey := Inkey( 0 ) @@ -166,7 +166,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo nPos := 0 nAtTop := Max( 1, nPos - nNumRows + 1 ) ELSE - DO WHILE nPos < nLastItem .AND. !Ach_Select( alSelect, nPos ) + DO WHILE nPos < nLastItem .AND. ! Ach_Select( alSelect, nPos ) nPos++ ENDDO @@ -188,7 +188,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo DispPage( acItems, alSelect, nTop, nLeft, nRight, nNumRows, nPos, nAtTop, nItems, nRowsClr ) - CASE ( nKey == K_ESC .OR. nMode == AC_NOITEM ) .AND. !lUserFunc + CASE ( nKey == K_ESC .OR. nMode == AC_NOITEM ) .AND. ! lUserFunc IF nPos != 0 DispLine( acItems[ nPos ], nTop + ( nPos - nAtTop ), nLeft, .T., .F., nNumCols ) @@ -225,7 +225,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo ENDIF ELSE nNewPos := nPos - 1 - DO WHILE !Ach_Select( alSelect, nNewPos ) + DO WHILE ! Ach_Select( alSelect, nNewPos ) nNewPos-- ENDDO IF INRANGE( nAtTop, nNewPos, nAtTop + nNumRows - 1 ) @@ -264,7 +264,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo nNewPos := nPos + 1 - DO WHILE !Ach_Select( alSelect, nNewPos ) + DO WHILE ! Ach_Select( alSelect, nNewPos ) nNewPos++ ENDDO @@ -288,7 +288,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo ENDIF - CASE nKey == K_CTRL_PGUP .OR. ( nKey == K_HOME .AND. !lUserFunc ) + CASE nKey == K_CTRL_PGUP .OR. ( nKey == K_HOME .AND. ! lUserFunc ) IF nPos == nFrstItem IF nAtTop == Max( 1, nPos - nNumRows + 1 ) @@ -303,7 +303,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo DispPage( acItems, alSelect, nTop, nLeft, nRight, nNumRows, nPos, nAtTop, nItems ) ENDIF - CASE nKey == K_CTRL_PGDN .OR. ( nKey == K_END .AND. !lUserFunc ) + CASE nKey == K_CTRL_PGDN .OR. ( nKey == K_END .AND. ! lUserFunc ) IF nPos == nLastItem IF nAtTop == Min( nLastItem, nItems - nNumRows + 1 ) @@ -335,7 +335,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo ENDIF ELSE nNewPos := nAtTop - DO WHILE !Ach_Select( alSelect, nNewPos ) + DO WHILE ! Ach_Select( alSelect, nNewPos ) nNewPos++ ENDDO IF nNewPos != nPos @@ -356,7 +356,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo ENDIF ELSE nNewPos := Min( nAtTop + nNumRows - 1, nItems ) - DO WHILE !Ach_Select( alSelect, nNewPos ) + DO WHILE ! Ach_Select( alSelect, nNewPos ) nNewPos-- ENDDO IF nNewPos != nPos @@ -386,7 +386,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo ELSE nPos := Max( nFrstItem, nPos - nNumRows + 1 ) nAtTop := Max( 1, nAtTop - nNumRows + 1 ) - DO WHILE nPos > nFrstItem .AND. !Ach_Select( alSelect, nPos ) + DO WHILE nPos > nFrstItem .AND. ! Ach_Select( alSelect, nPos ) nPos-- nAtTop-- ENDDO @@ -426,7 +426,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo nAtTop := nPos - nGap ENDIF // Make sure that the item is selectable - DO WHILE nPos < nLastItem .AND. !Ach_Select( alSelect, nPos ) + DO WHILE nPos < nLastItem .AND. ! Ach_Select( alSelect, nPos ) nPos++ nAtTop++ ENDDO @@ -438,7 +438,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo ENDIF ENDIF - CASE nKey == K_ENTER .AND. !lUserFunc + CASE nKey == K_ENTER .AND. ! lUserFunc IF nPos != 0 DispLine( acItems[ nPos ], nTop + ( nPos - nAtTop ), nLeft, .T., .F., nNumCols ) @@ -447,7 +447,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo nMode := AC_SELECT lFinished := .T. - CASE nKey == K_RIGHT .AND. !lUserFunc + CASE nKey == K_RIGHT .AND. ! lUserFunc IF nPos != 0 DispLine( acItems[ nPos ], nTop + ( nPos - nAtTop ), nLeft, .T., .F., nNumCols ) @@ -456,7 +456,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo nPos := 0 lFinished := .T. - CASE nKey == K_LEFT .AND. !lUserFunc + CASE nKey == K_LEFT .AND. ! lUserFunc IF nPos != 0 DispLine( acItems[ nPos ], nTop + ( nPos - nAtTop ), nLeft, .T., .F., nNumCols ) @@ -465,7 +465,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo nPos := 0 lFinished := .T. - CASE ( !lUserFunc .OR. nMode == AC_GOTO ) .AND. ; + CASE ( ! lUserFunc .OR. nMode == AC_GOTO ) .AND. ; ! ( cKey := Upper( hb_keyChar( nKey ) ) ) == "" // Find next selectable item @@ -554,7 +554,7 @@ FUNCTION AChoice( nTop, nLeft, nBottom, nRight, acItems, xSelect, xUserFunc, nPo nPos := 0 nAtTop := Max( 1, nPos - nNumRows + 1 ) ELSE - DO WHILE nPos < nLastItem .AND. !Ach_Select( alSelect, nPos ) + DO WHILE nPos < nLastItem .AND. ! Ach_Select( alSelect, nPos ) nPos++ ENDDO @@ -680,7 +680,7 @@ STATIC FUNCTION Ach_Select( alSelect, nPos ) IF nPos >= 1 .AND. nPos <= Len( alSelect ) sel := alSelect[ nPos ] - IF HB_ISSTRING( sel ) .AND. !Empty( sel ) + IF HB_ISSTRING( sel ) .AND. ! Empty( sel ) sel := &sel ENDIF IF HB_ISLOGICAL( sel ) diff --git a/harbour/src/rtl/browse.prg b/harbour/src/rtl/browse.prg index 2d470958d1..994bfd4694 100644 --- a/harbour/src/rtl/browse.prg +++ b/harbour/src/rtl/browse.prg @@ -405,7 +405,7 @@ STATIC PROCEDURE FreshOrder( oBrw ) oBrw:ForceStable() IF nRec != LastRec() + 1 - DO WHILE RecNo() != nRec .AND. !Bof() + DO WHILE RecNo() != nRec .AND. ! Bof() oBrw:Up() oBrw:ForceStable() ENDDO diff --git a/harbour/src/rtl/errsys.prg b/harbour/src/rtl/errsys.prg index 42cd564997..a9d7768b26 100644 --- a/harbour/src/rtl/errsys.prg +++ b/harbour/src/rtl/errsys.prg @@ -188,9 +188,9 @@ STATIC FUNCTION ErrorMessage( oError ) // add either filename or operation DO CASE - CASE !Empty( oError:filename ) + CASE ! Empty( oError:filename ) cMessage += ": " + oError:filename - CASE !Empty( oError:operation ) + CASE ! Empty( oError:operation ) cMessage += ": " + oError:operation ENDCASE diff --git a/harbour/src/rtl/memoedit.prg b/harbour/src/rtl/memoedit.prg index 6a9f796ca8..1aaf32cd3e 100644 --- a/harbour/src/rtl/memoedit.prg +++ b/harbour/src/rtl/memoedit.prg @@ -219,7 +219,7 @@ METHOD HandleUserKey( nKey, nUserKey ) CLASS HBMemoEditor ENDIF CASE nUserKey == ME_TOGGLEWRAP - ::lWordWrap := !::lWordWrap + ::lWordWrap := ! ::lWordWrap CASE nUserKey == ME_TOGGLESCROLL // TODO: HBEditor does not support vertical scrolling of text inside window without moving cursor position diff --git a/harbour/src/rtl/menusys.prg b/harbour/src/rtl/menusys.prg index 4d58f9e1c5..d9783849e8 100644 --- a/harbour/src/rtl/menusys.prg +++ b/harbour/src/rtl/menusys.prg @@ -91,11 +91,11 @@ FUNCTION IsShortcut( oMenu, nKey, nID ) RETURN IsQuick( oMenu, nKey, @nID ) - // Test and assign top menu item shortCut, enabled, and !PopUp: + // Test and assign top menu item shortCut, enabled, and ! PopUp: // Changed by enclosing assignment before ':Enabled': ELSEIF ( nShortCut := oMenu:getShortCt( nKey ) ) > 0 .AND. ; ( oItem := oMenu:getItem( nShortcut ) ):enabled .AND. ; - !oItem:isPopUp() + ! oItem:isPopUp() oMenu:select( nShortCut ) Eval( oItem:data, oItem ) diff --git a/harbour/src/rtl/objfunc.prg b/harbour/src/rtl/objfunc.prg index 2148163c1c..bc38df9d34 100644 --- a/harbour/src/rtl/objfunc.prg +++ b/harbour/src/rtl/objfunc.prg @@ -184,7 +184,7 @@ FUNCTION __objAddMethod( oObject, cSymbol, nFuncPtr ) IF ! HB_ISOBJECT( oObject ) .OR. ! HB_ISSTRING( cSymbol ) .OR. ! HB_ISSYMBOL( nFuncPtr ) __errRT_BASE( EG_ARG, 3101, NIL, ProcName( 0 ) ) - ELSEIF !__objHasMsg( oObject, cSymbol ) + ELSEIF ! __objHasMsg( oObject, cSymbol ) __clsAddMsg( oObject:ClassH, cSymbol, nFuncPtr, HB_OO_MSG_METHOD, NIL, 1 ) ENDIF @@ -194,7 +194,7 @@ FUNCTION __objAddInline( oObject, cSymbol, bInline ) IF ! HB_ISOBJECT( oObject ) .OR. ! HB_ISSTRING( cSymbol ) __errRT_BASE( EG_ARG, 3101, NIL, ProcName( 0 ) ) - ELSEIF !__objHasMsg( oObject, cSymbol ) + ELSEIF ! __objHasMsg( oObject, cSymbol ) __clsAddMsg( oObject:ClassH, cSymbol, bInline, HB_OO_MSG_INLINE, NIL, 1 ) ENDIF @@ -206,7 +206,7 @@ FUNCTION __objAddData( oObject, cSymbol ) IF ! HB_ISOBJECT( oObject ) .OR. ! HB_ISSTRING( cSymbol ) __errRT_BASE( EG_ARG, 3101, NIL, ProcName( 0 ) ) - ELSEIF !__objHasMsg( oObject, cSymbol ) .AND. !__objHasMsg( oObject, "_" + cSymbol ) + ELSEIF ! __objHasMsg( oObject, cSymbol ) .AND. ! __objHasMsg( oObject, "_" + cSymbol ) hClass := oObject:ClassH nSeq := __cls_IncData( hClass ) // Allocate new Seq# __clsAddMsg( hClass, cSymbol, nSeq, HB_OO_MSG_ACCESS, NIL, 1 ) diff --git a/harbour/src/rtl/scrollbr.prg b/harbour/src/rtl/scrollbr.prg index 0730d47587..96ff0f2316 100644 --- a/harbour/src/rtl/scrollbr.prg +++ b/harbour/src/rtl/scrollbr.prg @@ -263,8 +263,8 @@ METHOD bitmaps( aBitmaps ) CLASS SCROLLBAR METHOD colorSpec( cColorSpec ) CLASS SCROLLBAR IF HB_ISSTRING( cColorSpec ) .AND. ; - !Empty( hb_ColorIndex( cColorSpec, 1 ) ) .AND. ; - Empty( hb_ColorIndex( cColorSpec, 2 ) ) + ! Empty( hb_ColorIndex( cColorSpec, 1 ) ) .AND. ; + Empty( hb_ColorIndex( cColorSpec, 2 ) ) ::cColorSpec := cColorSpec ENDIF @@ -383,7 +383,7 @@ METHOD CalcThumbPos() CLASS SCROLLBAR RETURN .F. ENDIF - IF !::lOverride + IF ! ::lOverride ::nThumbPos := Min( Max( Round( ::nCurrent * ( ( nBarLength - 1 ) / nTotal ) + 1, 0 ), 1 ), nBarLength ) ENDIF diff --git a/harbour/src/rtl/teditor.prg b/harbour/src/rtl/teditor.prg index 673d20130d..c3ece0d9ea 100644 --- a/harbour/src/rtl/teditor.prg +++ b/harbour/src/rtl/teditor.prg @@ -475,7 +475,7 @@ METHOD MoveCursor( nKey ) CLASS HBEditor SWITCH nKey CASE K_DOWN - IF !::lEditAllow + IF ! ::lEditAllow DO WHILE ::Row() < ::nBottom .AND. ::nRow < ::naTextLen ::nRow++ ::SetPos( ::Row() + 1, ::Col() ) @@ -989,7 +989,7 @@ METHOD BrowseText( nPassedKey ) IF nKey == K_ESC ::lExitEdit := .T. ELSE - IF !::MoveCursor( nKey ) + IF ! ::MoveCursor( nKey ) ::KeyboardHook( nKey ) ENDIF ENDIF @@ -1128,7 +1128,7 @@ STATIC FUNCTION Text2Array( cString, nWordWrapCol ) IF nWordWrapCol != NIL .AND. Len( cLine ) > nWordWrapCol - DO WHILE !Empty( cLine ) + DO WHILE ! Empty( cLine ) // Split line at nWordWrapCol boundary IF Len( cLine ) > nWordWrapCol diff --git a/harbour/src/rtl/tmenusys.prg b/harbour/src/rtl/tmenusys.prg index 687e4d0513..0047ff9208 100644 --- a/harbour/src/rtl/tmenusys.prg +++ b/harbour/src/rtl/tmenusys.prg @@ -538,7 +538,7 @@ METHOD PopAll() CLASS HBMenuSys /*** * -* Eval() the Data block if selected MenuItem is !IsPopUp. +* Eval() the Data block if selected MenuItem is ! IsPopUp. * ***/ METHOD Execute() CLASS HBMenuSys @@ -546,7 +546,7 @@ METHOD Execute() CLASS HBMenuSys LOCAL oNewMenu := ::oMenu:getItem( ::oMenu:current ) LOCAL lPas := .T. - // Execute the Data block if selected MenuItem is !IsPopUp: + // Execute the Data block if selected MenuItem is ! IsPopUp: IF HB_ISOBJECT( oNewMenu ) .AND. ! oNewMenu:IsPopUp IF ::oMenu:ClassName() $ "TOPBARMENU|POPUPMENU|HB_POPUPMENU" diff --git a/harbour/src/rtl/tpopup.prg b/harbour/src/rtl/tpopup.prg index 0577b076c1..eda4463695 100644 --- a/harbour/src/rtl/tpopup.prg +++ b/harbour/src/rtl/tpopup.prg @@ -572,7 +572,7 @@ METHOD colorSpec( cColorSpec ) CLASS POPUPMENU IF cColorSpec != NIL ::cColorSpec := __eInstVar53( Self, "COLORSPEC", cColorSpec, "C", 1001, ; - {|| !Empty( hb_ColorIndex( cColorSpec, 5 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 6 ) ) } ) + {|| ! Empty( hb_ColorIndex( cColorSpec, 5 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 6 ) ) } ) ENDIF RETURN ::cColorSpec diff --git a/harbour/src/rtl/tpopuphb.prg b/harbour/src/rtl/tpopuphb.prg index f0dfef611d..da0be00e94 100644 --- a/harbour/src/rtl/tpopuphb.prg +++ b/harbour/src/rtl/tpopuphb.prg @@ -134,7 +134,7 @@ METHOD isShortCut( nKey, nID ) CLASS hb_POPUPMENU LOCAL i DO CASE - // Test and assign top menu item shortCut, enabled, and !PopUp: + // Test and assign top menu item shortCut, enabled, and ! PopUp: // Changed by enclosing assignment before ':Enabled': CASE ( ( nShortCut := ::getShortCt( nKey ) ) > 0 ) .AND. ; ( ( oItem := ::getItem( nShortcut ) ):enabled ) .AND. ; diff --git a/harbour/src/rtl/treport.prg b/harbour/src/rtl/treport.prg index 6c3ed22a7a..1a7d6f143e 100644 --- a/harbour/src/rtl/treport.prg +++ b/harbour/src/rtl/treport.prg @@ -698,7 +698,7 @@ METHOD ExecuteReport() CLASS HBReportForm // page eject after group // put CRFF after group - IF nGroup == 1 .AND. !::lFirstPass .AND. !lAnySubTotals + IF nGroup == 1 .AND. ! ::lFirstPass .AND. ! lAnySubTotals IF ::aReportData[ RPT_GROUPS, nGroup, RGT_AEJECT ] ::nLinesLeft := 0 ENDIF @@ -1194,7 +1194,7 @@ STATIC FUNCTION Occurs( cSearch, cTarget ) LOCAL nPos, nCount := 0 - DO WHILE !Empty( cTarget ) + DO WHILE ! Empty( cTarget ) IF ( nPos := At( cSearch, cTarget ) ) != 0 nCount++ cTarget := SubStr( cTarget, nPos + 1 ) diff --git a/harbour/src/rtl/ttopbar.prg b/harbour/src/rtl/ttopbar.prg index 602d25eebd..7e4401480f 100644 --- a/harbour/src/rtl/ttopbar.prg +++ b/harbour/src/rtl/ttopbar.prg @@ -396,7 +396,7 @@ METHOD colorSpec( cColorSpec ) CLASS TOPBARMENU IF cColorSpec != NIL ::cColorSpec := __eInstVar53( Self, "COLORSPEC", cColorSpec, "C", 1001,; - {|| !Empty( hb_ColorIndex( cColorSpec, 5 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 6 ) ) } ) + {|| ! Empty( hb_ColorIndex( cColorSpec, 5 ) ) .AND. Empty( hb_ColorIndex( cColorSpec, 6 ) ) } ) ENDIF RETURN ::cColorSpec diff --git a/harbour/src/rtl/typefile.prg b/harbour/src/rtl/typefile.prg index e16623d1e5..736efc1b0c 100644 --- a/harbour/src/rtl/typefile.prg +++ b/harbour/src/rtl/typefile.prg @@ -120,7 +120,7 @@ PROCEDURE __TypeFile( cFile, lPrint ) oErr:OsCode := FError() oErr:tries := ++nRetries xRecover := Eval( ErrorBlock(), oErr ) - IF HB_ISLOGICAL( xRecover ) .AND. !xRecover /* user select "Default" */ + IF HB_ISLOGICAL( xRecover ) .AND. ! xRecover /* user select "Default" */ RETURN ENDIF ENDDO diff --git a/harbour/tests/ac_test2.prg b/harbour/tests/ac_test2.prg index 78d73e2817..45116d9cb1 100644 --- a/harbour/tests/ac_test2.prg +++ b/harbour/tests/ac_test2.prg @@ -48,7 +48,7 @@ PROCEDURE Main() cls @ 2, 1 SAY " --Visky-- --Vodka-- --Grapa--" @ 3, 14 SAY "--Water--" - DO WHILE !lExit + DO WHILE ! lExit DO CASE CASE nCounter == 1 diff --git a/harbour/tests/aliaslck.prg b/harbour/tests/aliaslck.prg index e3611692b0..ec0fa1e633 100644 --- a/harbour/tests/aliaslck.prg +++ b/harbour/tests/aliaslck.prg @@ -15,7 +15,7 @@ proc main() local cFile := "_tst" - if !dbExists( cFile ) + if ! dbExists( cFile ) dbCreate( cFile, { { "F", "C", 10, 0 } } ) use _tst exclusive while lastRec() < 100 diff --git a/harbour/tests/cpinfo.prg b/harbour/tests/cpinfo.prg index 4ba463834a..d85804b78c 100644 --- a/harbour/tests/cpinfo.prg +++ b/harbour/tests/cpinfo.prg @@ -54,13 +54,13 @@ proc main( cdp, info, unicode ) exit endif next - if !lSort + if ! lSort ? "simple byte sorting !!!" endif lBin := lWarn := lMixed := .f. cUp := cLo := cOrd := "" for i := 1 to len( a ) - if i < len(a) .and. a[i] > a[ i + 1 ] .and. !isalpha( chr( a[ i ] ) ) + if i < len(a) .and. a[i] > a[ i + 1 ] .and. ! isalpha( chr( a[ i ] ) ) ? "non alpha character " + charval( chr( a[ i ] ) ) + ; " sorted in non ASCII order !!!" lBin := lWarn := .t. @@ -70,7 +70,7 @@ proc main( cdp, info, unicode ) if c + chr( 0 ) > chr( a[ i + 1 ] ) + chr( 0 ) ? "character " + charis( c ) + " is wrongly sorted" lBin := lWarn := .t. - elseif !lEqual .and. c + chr( 0 ) = chr( a[ i + 1 ] ) + chr( 0 ) + elseif ! lEqual .and. c + chr( 0 ) = chr( a[ i + 1 ] ) + chr( 0 ) ? "character " + charis( c ) + " and " + chr( a[ i + 1 ] ) + ; " have the same weight" lWarn := .t. @@ -97,7 +97,7 @@ proc main( cdp, info, unicode ) ? "character " + charis( c ) + ; " is the same as upper and lower" lWarn := .t. - elseif !islower( lower( c ) ) + elseif ! islower( lower( c ) ) ? "character " + charis( c ) + ; " has lower character " + charis( lower( c ) ) + ; " not marked as lower" @@ -113,7 +113,7 @@ proc main( cdp, info, unicode ) ? "character " + charis( c ) + ; " is the same as upper and lower" lWarn := .t. - elseif !isupper( upper( c ) ) + elseif ! isupper( upper( c ) ) ? "character " + charis( c ) + ; " has upper character " + charis( upper( c ) ) + ; " not marked as upper" @@ -200,7 +200,7 @@ proc main( cdp, info, unicode ) endif endif elseif c $ cLo2 - if !lIsLo + if ! lIsLo if lIsUp cOrd2 += cLo2 endif @@ -243,7 +243,7 @@ proc main( cdp, info, unicode ) ? "letters case are mixed" lMixed := .t. endif - if ! cOrd == cOrd2 .and. lSort .and. !lMixed + if ! cOrd == cOrd2 .and. lSort .and. ! lMixed ? "letters are not sorted continuously" lBin := lWarn := .t. endif @@ -266,7 +266,7 @@ proc main( cdp, info, unicode ) ? replicate( "=", 50 ) ? - if !empty( cdp ) + if ! empty( cdp ) write_file( "cp" + lower( cdp ) + ".c", ; genCP( cdp, info, unicode, lBin, lWarn, lMixed, cUp, cLo ) ) endif @@ -285,10 +285,10 @@ static function pad_letters( cUp, cLo, lBin ) if upper( cL ) == cU .and. lower( cU ) == cL ++i ++j - elseif cL == "" .or. ( ! cU == "" .and. !islower( lower( cU ) ) ) + elseif cL == "" .or. ( ! cU == "" .and. ! islower( lower( cU ) ) ) cL := " " ++i - elseif cU == "" .or. !isupper( upper( cL ) ) + elseif cU == "" .or. ! isupper( upper( cL ) ) cU := " " ++j elseif upper( cL ) $ substr( cUp, i + 1 ) @@ -298,8 +298,8 @@ static function pad_letters( cUp, cLo, lBin ) cU := upper( cL ) ++j endif - if !lBin .and. ( cU == " " .or. cU $ cUp2 ) .and. ; - ( cL == " " .or. cL $ cLo2 ) + if ! lBin .and. ( cU == " " .or. cU $ cUp2 ) .and. ; + ( cL == " " .or. cL $ cLo2 ) lBin := .t. endif cUp2 += cU @@ -428,7 +428,7 @@ static function genCPfile( id, info, unicode, flags, upper, lower, sort, ; '#define HB_CP_ID $1' + EOL + ; '#define HB_CP_INFO "$2"' + EOL + ; '#define HB_CP_UNITB HB_UNITB_$3' + EOL - if !lBin + if ! lBin cDef += ; '#define HB_CP_ACSORT HB_CDP_ACSORT_NONE' + EOL if lMixed @@ -452,7 +452,7 @@ static function genCPfile( id, info, unicode, flags, upper, lower, sort, ; 'static const unsigned char s_lower[ 256 ] = { $l };' + EOL + ; 'static const unsigned char s_sort [ 256 ] = { $s };' + EOL + ; EOL - if !lBin + if ! lBin cDef += ; '#endif' + EOL + EOL endif diff --git a/harbour/tests/gtchars.prg b/harbour/tests/gtchars.prg index e26d119a20..c48ca43973 100644 --- a/harbour/tests/gtchars.prg +++ b/harbour/tests/gtchars.prg @@ -42,7 +42,7 @@ PROCEDURE Main( cTermCP, cHostCP, lBoxChar ) ELSE cHostCP := Upper( cHostCP ) ENDIF - lBoxChar := !Empty( lBoxChar ) + lBoxChar := ! Empty( lBoxChar ) hb_gtInfo( HB_GTI_FONTNAME, "fixed" ) hb_gtInfo( HB_GTI_FONTWIDTH, 9 ) diff --git a/harbour/tests/gtkeys.prg b/harbour/tests/gtkeys.prg index 2a2cc0616d..21d0e3fc4e 100644 --- a/harbour/tests/gtkeys.prg +++ b/harbour/tests/gtkeys.prg @@ -245,7 +245,7 @@ PROCEDURE Main( cTermCP, cHostCP, lBoxChar ) ELSE cHostCP := Upper( cHostCP ) ENDIF - lBoxChar := !Empty( lBoxChar ) + lBoxChar := ! Empty( lBoxChar ) hb_cdpSelect( cHostCP ) hb_SetTermCP( cTermCP, cHostCP, lBoxChar ) #else diff --git a/harbour/tests/inherit.prg b/harbour/tests/inherit.prg index bf0009b356..8d428cbdeb 100644 --- a/harbour/tests/inherit.prg +++ b/harbour/tests/inherit.prg @@ -45,7 +45,7 @@ PROCEDURE Main() ? ? "Basic copy loop using the default Run() from TTextFile" - DO WHILE !oFrom:lEoF + DO WHILE ! oFrom:lEoF cOut := oFrom:Run() ? cOut oTo:Run( cOut ) @@ -312,4 +312,4 @@ STATIC FUNCTION GOTO( nLine ) ENDDO ENDIF - RETURN !::lEoF + RETURN ! ::lEoF diff --git a/harbour/tests/newrdd.prg b/harbour/tests/newrdd.prg index 23c5d130db..1e3ef7c2a3 100644 --- a/harbour/tests/newrdd.prg +++ b/harbour/tests/newrdd.prg @@ -145,12 +145,12 @@ PROCEDURE Main() Inkey( 0 ) CLS - ? "WHILE !TESTDBF->( EOF() )" + ? "WHILE ! TESTDBF->( Eof() )" ? " ? TESTDBF->FIRST, TESTDBF->( RecNo() )" ? " TESTDBF->( dbSkip() )" ? "ENDDO" ? "" - WHILE !TESTDBF->( Eof() ) + WHILE ! TESTDBF->( Eof() ) ? TESTDBF->FIRST, TESTDBF->( RecNo() ) TESTDBF->( dbSkip() ) ENDDO @@ -162,7 +162,7 @@ PROCEDURE Main() ? "SET FILTER TO TESTDBF->AGE == 21" ? "? TESTDBF->( dbFilter() )" ? "TESTDBF->( dbGoTop() )" - ? "WHILE !TESTDBF->( EOF() )" + ? "WHILE ! TESTDBF->( Eof() )" ? " ? TESTDBF->FIRST, TESTDBF->AGE, TESTDBF->( RecNo() )" ? " TESTDBF->( dbSkip() )" ? "ENDDO" @@ -171,7 +171,7 @@ PROCEDURE Main() SET FILTER TO TESTDBF->AGE == 21 ? TESTDBF->( dbFilter() ) TESTDBF->( dbGoTop() ) - WHILE !TESTDBF->( Eof() ) + WHILE ! TESTDBF->( Eof() ) ? TESTDBF->FIRST, TESTDBF->AGE, TESTDBF->( RecNo() ) TESTDBF->( dbSkip() ) ENDDO @@ -234,7 +234,7 @@ PROCEDURE Main() ? 'Select( "TESTDBF" )' ? "SET FILTER TO TESTDBF->SALARY > 120000" ? "TESTDBF->( dbGoTop() )" - ? "WHILE !TESTDBF->( EOF() )" + ? "WHILE ! TESTDBF->( Eof() )" ? " NEWRDD->( dbAppend() )" ? " NEWRDD->FIRST_NAME := TESTDBF->FIRST" ? " NEWRDD->AGE := TESTDBF->AGE" @@ -260,7 +260,7 @@ PROCEDURE Main() SELECT( "TESTDBF" ) SET FILTER TO TESTDBF->SALARY > 120000 TESTDBF->( dbGoTop() ) - WHILE !TESTDBF->( Eof() ) + WHILE ! TESTDBF->( Eof() ) NEWRDD->( dbAppend() ) NEWRDD->FIRST_NAME := TESTDBF->FIRST NEWRDD->AGE := TESTDBF->AGE diff --git a/harbour/tests/rddtest/rddtst.prg b/harbour/tests/rddtest/rddtst.prg index 19fd98f5b6..6b17b09162 100644 --- a/harbour/tests/rddtest/rddtst.prg +++ b/harbour/tests/rddtest/rddtst.prg @@ -241,7 +241,7 @@ return cStr else s1 := s2 := "" endif - if !empty( aExState ) .and. lOK + if ! empty( aExState ) .and. lOK for i := 1 to len( aExState ) if ! valtype( aState[ i ] ) == valtype( aExState[ i ] ) .or. ! aState[ i ] == aExState[ i ] lOK := ( .F. ) @@ -251,7 +251,7 @@ return cStr endif ? ?? iif( lOK, "OK ", "ERR " ) + cAction + " => " + s1 + itm2str( aState ) - if !lOK + if ! lOK ? ?? " " + cAction + " => " + s2 + itm2str( aExState ) s_nErrors++ diff --git a/harbour/tests/sdf_test.prg b/harbour/tests/sdf_test.prg index 600dacee6c..1caa84e959 100644 --- a/harbour/tests/sdf_test.prg +++ b/harbour/tests/sdf_test.prg @@ -40,7 +40,7 @@ PROCEDURE Main() // Copy the last 10 records again. GO BOTTOM SKIP -9 - COPY TO test6 SDF WHILE !Eof() + COPY TO test6 SDF WHILE ! Eof() // Copy only some of the last 10 records. GO BOTTOM diff --git a/harbour/tests/speedtst.prg b/harbour/tests/speedtst.prg index 194538811b..8c51febf75 100644 --- a/harbour/tests/speedtst.prg +++ b/harbour/tests/speedtst.prg @@ -198,7 +198,7 @@ proc main( _p01, _p02, _p03, _p04, _p05, _p06, _p07, _p08, _p09, _p10, ; cParam := cMemTests endif for i := 1 to N_TESTS - if !strzero( i, 3 ) $ cParam + if ! strzero( i, 3 ) $ cParam cExclude += strzero( i, 3 ) + " " endif next @@ -506,7 +506,7 @@ create_db() //x := seconds() + 5; while x > seconds(); enddo #ifdef __MT__ -if !hb_mtvm() +if ! hb_mtvm() #else if .t. #endif @@ -533,7 +533,7 @@ endif ? "THREADS:", iif( nMT < 0, "all->" + ltrim( str( N_TESTS ) ), ltrim( str( nMT ) ) ) ? "N_LOOPS:", ltrim( str( N_LOOPS ) ) -if !empty( cExclude ) +if ! empty( cExclude ) ? "excluded tests:", cExclude endif @@ -563,7 +563,7 @@ nTimeTotST := nTimeTotMT := 0 next for i:=1 to N_TESTS cTest := strzero( i, 3 ) - if !cTest $ cExclude + if ! cTest $ cExclude /* linear execution */ nTimeST := seconds() @@ -599,7 +599,7 @@ nTimeTotST := nTimeTotMT := 0 aThreads := array( N_TESTS ) for i:=1 to N_TESTS cNum := strzero( i, 3 ) - if !cNum $ cExclude + if ! cNum $ cExclude aThreads[ i ] := hb_threadStart( "t" + cNum ) endif next @@ -616,7 +616,7 @@ nTimeTotST := nTimeTotMT := 0 aThreads[ i ] := hb_threadStart( "thTest", mtxJobs, aResults ) next for i:=1 to N_TESTS - if !strzero( i, 3 ) $ cExclude + if ! strzero( i, 3 ) $ cExclude hb_mutexNotify( mtxJobs, i ) endif next @@ -633,7 +633,7 @@ nTimeTotST := nTimeTotMT := 0 else for i:=1 to N_TESTS cNum := strzero( i, 3 ) - if !cNum $ cExclude + if ! cNum $ cExclude ? dsp_result( &( "t" + cNum )(), nLoopOverHead ) endif next @@ -641,7 +641,7 @@ nTimeTotST := nTimeTotMT := 0 #else for i:=1 to N_TESTS cNum := strzero( i, 3 ) - if !cNum $ cExclude + if ! cNum $ cExclude ? dsp_result( &( "t" + cNum )(), nLoopOverHead ) endif next diff --git a/harbour/tests/stripem.prg b/harbour/tests/stripem.prg index e2be98ac55..105d9268d8 100644 --- a/harbour/tests/stripem.prg +++ b/harbour/tests/stripem.prg @@ -41,7 +41,7 @@ PROCEDURE Main( cFrom, cTo ) // ? hb_ValToExp( __objGetMethodList( oTo ) ) oTo:New( cTo , "W" ) - DO WHILE !oFrom:EOF() + DO WHILE ! oFrom:Eof() cOut := oFrom:Run() IF ! Empty( cOut ) oTo:Run( cOut ) diff --git a/harbour/tests/tb1.prg b/harbour/tests/tb1.prg index d00e33235f..90729d7a63 100644 --- a/harbour/tests/tb1.prg +++ b/harbour/tests/tb1.prg @@ -123,7 +123,7 @@ PROCEDURE Main() oBrw:goBottom() WHILE .T. - WHILE !oBrw:stabilize() .AND. NextKey() == 0 + WHILE ! oBrw:stabilize() .AND. NextKey() == 0 ENDDO nKey := Inkey( 0 ) IF nKey == K_ESC diff --git a/harbour/tests/testbrw.prg b/harbour/tests/testbrw.prg index 5cb00577dc..44161a720b 100644 --- a/harbour/tests/testbrw.prg +++ b/harbour/tests/testbrw.prg @@ -70,7 +70,7 @@ PROCEDURE Main() ENDIF ENDDO #else - WHILE !lEnd + WHILE ! lEnd oBrowse:ForceStable() nKey := Inkey( 0 ) diff --git a/harbour/tests/testcdx.prg b/harbour/tests/testcdx.prg index eff5eb97e3..0031c9dda7 100644 --- a/harbour/tests/testcdx.prg +++ b/harbour/tests/testcdx.prg @@ -22,7 +22,7 @@ PROCEDURE Main() Select( "TESTDBF" ) SET FILTER TO TESTDBF->SALARY > 140000 TESTDBF->( dbGoTop() ) -// WHILE !TESTDBF->( Eof() ) +// WHILE ! TESTDBF->( Eof() ) // TESTCDX->( dbAppend() ) // TESTCDX->CHARACTER := TESTDBF->FIRST // TESTCDX->NUMERIC := TESTDBF->SALARY @@ -34,8 +34,8 @@ PROCEDURE Main() ? TESTCDX->( RecCount() ) TESTCDX->( dbGoTop() ) - ? TESTCDX->( EOF() ) - WHILE !TESTCDX->( EOF() ) + ? TESTCDX->( Eof() ) + WHILE ! TESTCDX->( Eof() ) ? TESTCDX->( RecNo() ), TESTCDX->NUMERIC ? TESTCDX->MEMO TESTCDX->( dbSkip() ) diff --git a/harbour/tests/testdbf.prg b/harbour/tests/testdbf.prg index 76aae3b604..da7285fe26 100644 --- a/harbour/tests/testdbf.prg +++ b/harbour/tests/testdbf.prg @@ -94,7 +94,7 @@ PROCEDURE Main() Inkey( 0 ) MYALIAS->( dbGoTop() ) - DO WHILE !MYALIAS->( EOF() ) + DO WHILE ! MYALIAS->( Eof() ) ? MYALIAS->NUMERIC MYALIAS->( dbSkip() ) ENDDO @@ -106,7 +106,7 @@ PROCEDURE Main() Inkey( 0 ) MYALIAS->( dbGoTop() ) - DO WHILE !MYALIAS->( EOF() ) + DO WHILE ! MYALIAS->( Eof() ) ? MYALIAS->NUMERIC MYALIAS->( dbSkip() ) ENDDO @@ -120,7 +120,7 @@ PROCEDURE Main() MYALIAS->( dbSetFilter( {|| MYALIAS->NUMERIC > 2 .AND. MYALIAS->NUMERIC < 8 }, ; "MYALIAS->NUMERIC > 2 .AND. MYALIAS->NUMERIC < 8" ) ) MYALIAS->( dbGoTop() ) - DO WHILE !MYALIAS->( EOF() ) + DO WHILE ! MYALIAS->( Eof() ) ? MYALIAS->NUMERIC MYALIAS->( dbSkip() ) ENDDO @@ -135,7 +135,7 @@ PROCEDURE Main() MYALIAS->( dbSetFilter( {|| MYALIAS->NUMERIC > 2 .AND. MYALIAS->NUMERIC < 8 }, ; "MYALIAS->NUMERIC > 2 .AND. MYALIAS->NUMERIC < 8" ) ) MYALIAS->( dbGoTop() ) - DO WHILE !MYALIAS->( EOF() ) + DO WHILE ! MYALIAS->( Eof() ) ? MYALIAS->NUMERIC MYALIAS->( dbSkip() ) ENDDO @@ -157,7 +157,7 @@ PROCEDURE Main() Inkey( 0 ) ? "Value of fields:" MYALIAS->( dbGoTop() ) - DO WHILE !MYALIAS->( EOF() ) + DO WHILE ! MYALIAS->( Eof() ) ? MYALIAS->NUMERIC MYALIAS->( dbSkip() ) ENDDO diff --git a/harbour/tests/testntx.prg b/harbour/tests/testntx.prg index eccd494391..4f24a48e83 100644 --- a/harbour/tests/testntx.prg +++ b/harbour/tests/testntx.prg @@ -17,7 +17,7 @@ PROCEDURE Main() ? IndexKey() Inkey( 0 ) GO TOP - DO WHILE !Eof() + DO WHILE ! Eof() ? ++i, Last, First SKIP ENDDO @@ -26,7 +26,7 @@ PROCEDURE Main() Inkey( 0 ) SKIP -1 - DO WHILE !Bof() + DO WHILE ! Bof() ? i-- , Last, First SKIP -1 ENDDO @@ -36,7 +36,7 @@ PROCEDURE Main() ? IndexKey() Inkey( 0 ) GO TOP - DO WHILE !Eof() + DO WHILE ! Eof() ? ++i, Last, First SKIP ENDDO @@ -45,7 +45,7 @@ PROCEDURE Main() Inkey( 0 ) SKIP -1 - DO WHILE !Bof() + DO WHILE ! Bof() ? i-- , Last, First SKIP -1 ENDDO @@ -55,7 +55,7 @@ PROCEDURE Main() ? IndexKey() Inkey( 0 ) GO TOP - DO WHILE !Eof() + DO WHILE ! Eof() ? ++i, Last, First SKIP ENDDO @@ -64,7 +64,7 @@ PROCEDURE Main() Inkey( 0 ) SKIP -1 - DO WHILE !Bof() + DO WHILE ! Bof() ? i-- , Last, First SKIP -1 ENDDO diff --git a/harbour/tests/testrdd2.prg b/harbour/tests/testrdd2.prg index b7a7b9232e..fa19d5c320 100644 --- a/harbour/tests/testrdd2.prg +++ b/harbour/tests/testrdd2.prg @@ -187,7 +187,7 @@ PROCEDURE Main( cRDDType, cAdsMode ) // Now check each and every record for accuracy - DO WHILE ! EOF() + DO WHILE ! Eof() // TEST: Field access @@ -286,13 +286,13 @@ PROCEDURE Main( cRDDType, cAdsMode ) SET EXACT ON LOCATE for FIELD->CHAR = "J RECORD" - IF ! EOF() + IF ! Eof() NotifyUser( "LOCATE with EXACT ON failed" ) ENDIF SET EXACT OFF LOCATE for FIELD->CHAR = "J RECORD" - IF EOF() + IF Eof() NotifyUser( "LOCATE with EXACT OFF failed" ) ENDIF diff --git a/harbour/tests/uc16_gen.prg b/harbour/tests/uc16_gen.prg index e466c5d321..78acb089a5 100644 --- a/harbour/tests/uc16_gen.prg +++ b/harbour/tests/uc16_gen.prg @@ -45,7 +45,7 @@ proc main() nUppers := nLowers := 0 for each cLine in hb_aTokens( hb_memoRead( "UnicodeData.txt" ), hb_eol() ) - if !empty( cLine ) + if ! empty( cLine ) aLine := hb_aTokens( cLine, ";" ) if len( aLine ) == 15 nCode := hb_hexToNum( aLine[ 1 ] ) @@ -60,7 +60,7 @@ proc main() ? "title + upper, line:", cLine:__enumIndex() endif elseif nLower != 0 - if "Lt" $ cGenCat .or. !lConvAll + if "Lt" $ cGenCat .or. ! lConvAll nLower := 0 elseif nWarning >= 2 ? "lower for non upper, line:", cLine:__enumIndex() @@ -72,7 +72,7 @@ proc main() endif nFlags := hb_bitOR( nFlags, HB_CDP_ALPHA, HB_CDP_LOWER ) elseif nUpper != 0 - if "Lt" $ cGenCat .or. !lConvAll + if "Lt" $ cGenCat .or. ! lConvAll nUpper := 0 elseif nWarning >= 2 ? "upper for non lower, line:", cLine:__enumIndex() diff --git a/harbour/tests/usrrdd/exarr.prg b/harbour/tests/usrrdd/exarr.prg index ff9f8c0abe..e869bc5e1f 100644 --- a/harbour/tests/usrrdd/exarr.prg +++ b/harbour/tests/usrrdd/exarr.prg @@ -111,7 +111,7 @@ PROCEDURE Main() field->birthday := SToD( "19400101" ) field->age := 66 - WHILE !Eof() + WHILE ! Eof() ? RecNo(), '"' + FIELD->NAME + '"' IF RecNo() == 20 Inkey( 0 ) @@ -125,7 +125,7 @@ PROCEDURE Main() ? "ALIAS", Alias(), "RECNO", RecNo(), ; "BOF", Bof(), "EOF", Eof(), "LASTREC", LastRec() WAIT - WHILE !Bof() + WHILE ! Bof() ? RecNo(), '[' + FIELD->NAME + ']' IF RecNo() == LastRec() - 20 Inkey( 0 ) diff --git a/harbour/tests/usrrdd/exfcm.prg b/harbour/tests/usrrdd/exfcm.prg index df2f2f185a..9df1f15609 100644 --- a/harbour/tests/usrrdd/exfcm.prg +++ b/harbour/tests/usrrdd/exfcm.prg @@ -15,7 +15,7 @@ PROCEDURE Main() dbGoTop() ? RecNo(), '"' + FIELD->LINE + '"' WAIT - DO WHILE !Eof() + DO WHILE ! Eof() ? RecNo(), '"' + FIELD->LINE + '"' IF RecNo() == 20 Inkey( 0 ) @@ -29,7 +29,7 @@ PROCEDURE Main() ? "ALIAS", Alias(), "RECNO", RecNo(), ; "BOF", Bof(), "EOF", Eof(), "LASTREC", LastRec() WAIT - DO WHILE !Bof() + DO WHILE ! Bof() ? RecNo(), '[' + FIELD->LINE + ']' IF RecNo() == LastRec() - 20 Inkey( 0 ) diff --git a/harbour/utils/hbtest/hbtest.prg b/harbour/utils/hbtest/hbtest.prg index e2bf0ed314..2794b4c060 100644 --- a/harbour/utils/hbtest/hbtest.prg +++ b/harbour/utils/hbtest/hbtest.prg @@ -640,7 +640,7 @@ FUNCTION HB_SToD( cDate ) LOCAL cOldDateFormat LOCAL dDate - IF ValType( cDate ) == "C" .AND. !Empty( cDate ) + IF ValType( cDate ) == "C" .AND. ! Empty( cDate ) cOldDateFormat := Set( _SET_DATEFORMAT, "yyyy/mm/dd" ) dDate := CToD( SubStr( cDate, 1, 4 ) + "/" +;