Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application Build Error... 1

Status
Not open for further replies.

amazing66

Programmer
Jul 10, 2001
13
0
0
AU
1. I am presently trying to teach myself CA-Clipper 5.3 from the documentation provided with the product however I run into trouble when I try to build the sample application. The code segment that appears 2b causing the problem is as follows (Page 4-55 of 'Getting Started'):

Code:
Function DC_MENUTest()
  //Change oinfo to public so that the form can
  // use it.
  // LOCAL oinfo
  PUBLIC oinfo
  SET ( _SET_EVENTMASK, INKEY_ALL )
  // Function added to use the database files.
  IF DC_UseFIles()

    MSETCURSOR(.T.)
    CLS
    MEMVAR->oInfo==DC_MENUCreate()
    
    // Add DO WHILE loop to stay in Menu loop
    // until menu ID 999 is chosen.
    DO WHILE;
       MENUMODAL (MEMVAR->oinfo,1,24,1,79,"R/W");
                 <>999
    ENDDO
  
  ENDIF

  RETURN ( NIL )

2. With this code the compiler produces the following error which 'points' to line 12 (MEMVAR->oInfo==DC_MENUCreate()) :

295K available
Compiling C:\CLIP53\CACI\DATA\DC_MENU.PRG
C:\CLIP53\CACI\DATA\DC_MENU.PRG(24) Error C2001 Syntax error: '=='
1 error

No code generated

3. I have re-typed this block many a times and still get the same compile error. Any ideas as to what I may be doing wrong? Is the error actually in this block? Any information would be greatly appreciated.

Cheers,
John






 
MEMVAR->oInfo==DC_MENUCreate()

This line is incorrect you must type:
MEMVAR->oInfo := DC_MENUCreate()

The == is a comparision operator, its valid in a IF, WHEN or CASE statement.

The asignament operator is :=

In the sample program, you are assigning the value returned from a function to a memvar, not comparing two values.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top