, , iif( := , := iif( == NIL, ) )
@@ -380,10 +374,18 @@ METHOD CacheLimiter( cNewLimiter ) CLASS uhttpd_Session
RETURN cOldLimiter
METHOD SetCookieParams( nLifeTime, cPath, cDomain, lSecure ) CLASS uhttpd_Session
- IF nLifeTime != NIL THEN ::nCookie_LifeTime := nLifeTime
- IF cPath != NIL THEN ::cCookie_Path := cPath
- IF cDomain != NIL THEN ::cCookie_Domain := cDomain
- IF lSecure != NIL THEN ::lCookie_Secure := lSecure
+ IF nLifeTime != NIL
+ ::nCookie_LifeTime := nLifeTime
+ ENDIF
+ IF cPath != NIL
+ ::cCookie_Path := cPath
+ ENDIF
+ IF cDomain != NIL
+ ::cCookie_Domain := cDomain
+ ENDIF
+ IF lSecure != NIL
+ ::lCookie_Secure := lSecure
+ ENDIF
RETURN NIL
METHOD RegenerateID() CLASS uhttpd_Session
@@ -566,18 +568,34 @@ METHOD CheckSID( cSID, cCRCKey ) CLASS uhttpd_Session
// ------------------------------
METHOD SetSaveHandler( bOpen, bClose, bRead, bWrite, bDestroy, bGC ) CLASS uhttpd_Session
- IF bOpen != NIL THEN ::bOpen := bOpen
- IF bClose != NIL THEN ::bClose := bClose
- IF bRead != NIL THEN ::bRead := bRead
- IF bWrite != NIL THEN ::bWrite := bWrite
- IF bDestroy != NIL THEN ::bDestroy := bDestroy
- IF bGC != NIL THEN ::bGC := bGC
+ IF bOpen != NIL
+ ::bOpen := bOpen
+ ENDIF
+ IF bClose != NIL
+ ::bClose := bClose
+ ENDIF
+ IF bRead != NIL
+ ::bRead := bRead
+ ENDIF
+ IF bWrite != NIL
+ ::bWrite := bWrite
+ ENDIF
+ IF bDestroy != NIL
+ ::bDestroy := bDestroy
+ ENDIF
+ IF bGC != NIL
+ ::bGC := bGC
+ ENDIF
RETURN NIL
METHOD SessionOpen( cPath, cName ) CLASS uhttpd_Session
//TraceLog( "SessionOpen() - cName", cName )
- IF cPath != NIL THEN ::cSavePath := cPath
- IF cName != NIL THEN ::cName := cName
+ IF cPath != NIL
+ ::cSavePath := cPath
+ ENDIF
+ IF cName != NIL
+ ::cName := cName
+ ENDIF
RETURN .T.
@@ -785,7 +803,9 @@ METHOD Encode() CLASS uhttpd_Session
FOR EACH cKey IN _SESSION:Keys
xVal := _SESSION[ cKey ]
- IF xVal != NIL THEN aAdd( aSerial, { cKey, xVal } )
+ IF xVal != NIL
+ AAdd( aSerial, { cKey, xVal } )
+ ENDIF
NEXT
ENDIF
diff --git a/harbour/src/rtl/tbrowse.prg b/harbour/src/rtl/tbrowse.prg
index 8251d0cbf0..f98b7128b0 100644
--- a/harbour/src/rtl/tbrowse.prg
+++ b/harbour/src/rtl/tbrowse.prg
@@ -845,7 +845,7 @@ METHOD forceStable() CLASS TBROWSE
* be changed. I'll change it in the future but first I will have
* to revert my stupid modifications in Harbour core code. Looking
* at old TBrowse implementation I replaced some:
- * DO WHILE !oBrw:stabilize(); END
+ * DO WHILE !oBrw:stabilize(); ENDDO
* with:
* oBrw:forceStable()
* In Clipper it's not the same because oBrw:forceStable()
diff --git a/harbour/tests/destruct.prg b/harbour/tests/destruct.prg
index 5547e91cb8..6baddd5a9e 100644
--- a/harbour/tests/destruct.prg
+++ b/harbour/tests/destruct.prg
@@ -56,7 +56,7 @@ STATIC PROCEDURE SIMPLETEST( type )
? "=> o := NIL"
BEGIN SEQUENCE
o := NIL
- END
+ END SEQUENCE
RETURN
@@ -73,11 +73,11 @@ STATIC PROCEDURE GCFREETEST( type )
? "=> o := NIL"
BEGIN SEQUENCE
o := NIL
- END
+ END SEQUENCE
? "=> hb_gcAll()"
BEGIN SEQUENCE
hb_gcAll()
- END
+ END SEQUENCE
RETURN
diff --git a/harbour/tests/switch.prg b/harbour/tests/switch.prg
index d40ddfad1b..262d7445a1 100644
--- a/harbour/tests/switch.prg
+++ b/harbour/tests/switch.prg
@@ -4,6 +4,7 @@
#ifdef __XHARBOUR__
#define OTHERWISE DEFAULT
+#define ENDSWITCH END
#endif
PROCEDURE Main()
@@ -15,7 +16,7 @@ PROCEDURE Main()
#ifndef __XHARBOUR__
SWITCH a
- END
+ ENDSWITCH
#endif
?
@@ -23,7 +24,7 @@ PROCEDURE Main()
SWITCH a
CASE 1
? "FOUND: 1"
- END
+ ENDSWITCH
?
? "2222222222222222222222222222222"
@@ -33,7 +34,7 @@ PROCEDURE Main()
EXIT
CASE "2"
? a
- END
+ ENDSWITCH
?
? "3333333333333333333333333333333"
@@ -44,7 +45,7 @@ PROCEDURE Main()
? "FOUND: 2"
OTHERWISE
? "other"
- END
+ ENDSWITCH
#ifndef __XHARBOUR__
?
@@ -52,7 +53,7 @@ PROCEDURE Main()
SWITCH a
OTHERWISE
? "OTHERWISE"
- END
+ ENDSWITCH
#endif
?
@@ -92,7 +93,7 @@ PROCEDURE Main()
EXIT
OTHERWISE
? "NOT FOUND: running OTHER"
- END
+ ENDSWITCH
#endif
?
@@ -113,10 +114,10 @@ PROCEDURE Main()
EXIT
OTHERWISE
? "Nested OTHERWISE"
- END
+ ENDSWITCH
?? "In CASE 1"
? a
- END
+ ENDSWITCH
? "========================================="
diff --git a/harbour/tests/t1.prg b/harbour/tests/t1.prg
index 74168bc178..eaf86a3c43 100644
--- a/harbour/tests/t1.prg
+++ b/harbour/tests/t1.prg
@@ -13,6 +13,6 @@ PROCEDURE Main()
? i
Eval( cb )
i++
- END
+ ENDDO
RETURN
diff --git a/harbour/tests/testbrw.prg b/harbour/tests/testbrw.prg
index 272e50fdbf..2020642e98 100644
--- a/harbour/tests/testbrw.prg
+++ b/harbour/tests/testbrw.prg
@@ -127,7 +127,7 @@ PROCEDURE Main()
ENDCASE
- end
+ ENDDO
#endif
SetPos( nRow, nCol )
SetColor( cColor )
diff --git a/harbour/tests/tstuse.prg b/harbour/tests/tstuse.prg
index 6c7fd69134..fc73ba1599 100644
--- a/harbour/tests/tstuse.prg
+++ b/harbour/tests/tstuse.prg
@@ -51,7 +51,7 @@ PROCEDURE mkTest( lNewArea, cRdd, cFile, cAlias, lShared, lReadOnly )
dbUseArea( lNewArea, cRdd, cFile, cAlias, lShared, lReadOnly )
RECOVER USING oErr
? "Error:", oErr:subCode, oErr:description, oErr:operation, oErr:osCode
- END
+ END SEQUENCE
? Select(), Alias(), NetErr(), Used()
ErrorBlock( cbErr )
diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg
index 704e04567c..a6a37b98c6 100644
--- a/harbour/utils/hbmk2/hbmk2.prg
+++ b/harbour/utils/hbmk2/hbmk2.prg
@@ -8738,7 +8738,7 @@ STATIC PROCEDURE PlugIn_Load( hbmk, cFileName )
hrb := hb_hrbLoad( HB_HRB_BIND_FORCELOCAL, cFile )
cType := I_( "(compiled)" )
lOK := .T.
- END
+ END /* SEQUENCE */
ENDIF
IF ! lOK .AND. !( Lower( cExt ) == ".hrb" ) /* Optimization: Don't try to load it as .prg if the extension is .hrb */
cType := I_( "(source)" )
@@ -8978,7 +8978,7 @@ STATIC FUNCTION PlugIn_call_low( hbmk, cName, hrb, ctx )
IF ! hbmk[ _HBMK_lQuiet ]
_hbmk_OutErr( hbmk, hb_StrFormat( I_( "Error: Executing plugin: %1$s at %3$s(%4$d)\n'%2$s'" ), cName, hbmk_ErrorMessage( oError ), oError:cargo[ 1 ], oError:cargo[ 2 ] ) )
ENDIF
- END
+ END /* SEQUENCE */
RETURN lSuccess
@@ -10484,7 +10484,7 @@ STATIC FUNCTION ArchCompFilter( hbmk, cItem, cFileName )
IF ! hbmk[ _HBMK_lQuiet ]
_hbmk_OutErr( hbmk, hb_StrFormat( I_( "Warning: Error in filter expression: '%1$s'" ), cFilterSrc ) )
ENDIF
- END
+ END /* SEQUENCE */
RETURN cRetVal
ENDIF
@@ -12766,7 +12766,7 @@ STATIC FUNCTION __hbshell_plugins_load( hPlugins, aParams )
RECOVER USING oError
plugin[ _PLUGIN_hHRB ] := NIL
OutErr( hb_StrFormat( I_( "Error: Loading shell plugin: %1$s\n'%2$s'" ), cFile:__enumKey(), hbmk_ErrorMessage( oError ) ) + _OUT_EOL )
- END
+ END /* SEQUENCE */
ENDIF
IF ! Empty( plugin[ _PLUGIN_hHRB ] )
@@ -13116,7 +13116,7 @@ STATIC PROCEDURE __hbshell_Exec( cCommand )
ENDIF
ENDIF
- END
+ END /* SEQUENCE */
s_nRow := Row()
s_nCol := Col()
diff --git a/harbour/utils/hbtest/rt_math.prg b/harbour/utils/hbtest/rt_math.prg
index d93f07eef0..33a55ba359 100644
--- a/harbour/utils/hbtest/rt_math.prg
+++ b/harbour/utils/hbtest/rt_math.prg
@@ -459,8 +459,8 @@ PROCEDURE Main_MATH()
#ifdef __HARBOUR__
- o:=errornew()
- s:="oscode"
+ o := ErrorNew()
+ s := "oscode"
o:&s := 1
TEST_LINE( o:&(s) , 1 )
o:&s++
@@ -473,7 +473,7 @@ PROCEDURE Main_MATH()
TEST_LINE( o:&(s) , 15 )
TEST_LINE( o:&(s)+=200 , 215 )
- WITH OBJECT errornew()
+ WITH OBJECT ErrorNew()
:&(s) := 1
TEST_LINE( :&(s) , 1 )
:&(s)++
@@ -485,9 +485,9 @@ PROCEDURE Main_MATH()
:&(s)+=10
TEST_LINE( :&(s) , 15 )
TEST_LINE( :&(s)+=200 , 215 )
- END
+ ENDWITH
- WITH OBJECT errornew()
+ WITH OBJECT ErrorNew()
:oscode := 1
TEST_LINE( :oscode , 1 )
:oscode++
@@ -499,7 +499,7 @@ PROCEDURE Main_MATH()
:oscode+=10
TEST_LINE( :oscode , 15 )
TEST_LINE( :oscode+=200 , 215 )
- END
+ ENDWITH
&s0 := 1
TEST_LINE( &s0 , 1 )