20000512-08:00 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.y
+ Added support for END to be used with FOR loops.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
20000512-08:00 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
|
||||
|
||||
* source/compiler/harbour.y
|
||||
+ Added support for END to be used with FOR loops.
|
||||
|
||||
20000512-13:31 GMT+2 Maurilio Longo <maurilio.longo@libero.it>
|
||||
|
||||
+ source/rtl/stringsx.c
|
||||
|
||||
@@ -113,9 +113,10 @@ extern "C" {
|
||||
#define HB_COMP_WARN_VAL_NOT_USED 20
|
||||
#define HB_COMP_WARN_ARRAY_ASSIGN_TYPE 21
|
||||
#define HB_COMP_WARN_ARRAY_ASSIGN_SUSPECT 22
|
||||
#define HB_COMP_WARN_MEANINGLESS 23
|
||||
#define HB_COMP_WARN_UNREACHABLE 24
|
||||
#define HB_COMP_WARN_DUPL_ANNOUNCE 25
|
||||
#define HB_COMP_WARN_CLASS_NOT_FOUND 23
|
||||
#define HB_COMP_WARN_MEANINGLESS 24
|
||||
#define HB_COMP_WARN_UNREACHABLE 25
|
||||
#define HB_COMP_WARN_DUPL_ANNOUNCE 26
|
||||
|
||||
/*
|
||||
* Errors generated by Harbour preprocessor
|
||||
|
||||
@@ -552,7 +552,10 @@ void hb_compVariableAdd( char * szVarName, BYTE cValueType )
|
||||
if ( cValueType == '+' )
|
||||
{
|
||||
//printf( "\nVariable %s is of Class: %s\n", szVarName, hb_comp_szClass );
|
||||
|
||||
pVar->pClass = hb_compClassFind( hb_comp_szClass );
|
||||
if( ! pVar->pClass )
|
||||
hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_CLASS_NOT_FOUND, hb_comp_szClass, szVarName );
|
||||
}
|
||||
|
||||
if ( hb_comp_iVarScope & VS_PARAMETER )
|
||||
@@ -800,7 +803,7 @@ PCOMCLASS hb_compClassAdd( char * szClassName )
|
||||
{
|
||||
PCOMCLASS pClass;
|
||||
|
||||
printf( "\nDeclaring Class: %s\n", szClassName );
|
||||
//printf( "\nDeclaring Class: %s\n", szClassName );
|
||||
|
||||
if ( hb_comp_iWarnings < 3 )
|
||||
return NULL;
|
||||
|
||||
@@ -1382,7 +1382,9 @@ StepExpr : /* default step expression */ { $<asExpr>$ = NULL; }
|
||||
;
|
||||
|
||||
ForStatements : EmptyStats NEXT { --hb_comp_wForCounter; }
|
||||
| EmptyStats NEXT IdentName { --hb_comp_wForCounter; }
|
||||
| EmptyStats NEXT IdentName { --hb_comp_wForCounter; }
|
||||
| EmptyStats END { --hb_comp_wForCounter; }
|
||||
| EmptyStats END IdentName { --hb_comp_wForCounter; }
|
||||
;
|
||||
|
||||
BeginSeq : BEGINSEQ { ++hb_comp_wSeqCounter; $<lNumber>$ = hb_compSequenceBegin(); } Crlf { hb_compLinePush(); }
|
||||
|
||||
@@ -113,6 +113,7 @@ char * hb_comp_szWarnings[] =
|
||||
"3Value of Variable \'%s\' never used",
|
||||
"3Incompatible type in assignment to declared array element expected: \'%s\'",
|
||||
"4Suspicious type in assignment to declared array element expected: \'%s\'",
|
||||
"3Class \'%s\' not known in declaration of variable \'%s\'",
|
||||
"0Meaningless use of expression: \'%s\'",
|
||||
"2Unreachable code",
|
||||
"1Redundant \'ANNOUNCE %s\' statement ignored"
|
||||
|
||||
@@ -76,7 +76,7 @@ STATIC lGlobal AS LOGICAL
|
||||
|
||||
PROCEDURE THEMAIN( optional )
|
||||
|
||||
STATIC lStatic := 0, oMyObj As Object From MyClass
|
||||
STATIC lStatic := 0, oMyObj As Object From WrongClass
|
||||
LOCAL cVar AS CHAR := [declare function]
|
||||
|
||||
oMyObj:MyMethod( 2, 3, 4 )
|
||||
@@ -89,6 +89,10 @@ PROCEDURE THEMAIN( optional )
|
||||
|
||||
PRIVATE TEST AS CHAR
|
||||
|
||||
FOR Conter := 1 TO 10
|
||||
? "For with End"
|
||||
NEXT
|
||||
|
||||
IF optional
|
||||
? 'Ok'
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user