FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Error in a class : default variable
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM

Error in a class : default variable

Posted: Fri Jan 27, 2006 02:27 AM
in xharbour or habour in a class there is this line :

Default nWidth  = 25, ;
           nHeight = 25


but when i compiled make an error
Error E0030  Syntax error: "parse error at 'NWIDTH'"


How ca I resolve it

Regards,
silvio
Best Regards, Saludos



Falconi Silvio
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM

Error in a class : default variable

Posted: Fri Jan 27, 2006 08:27 AM
Silvio,

you missed the double point, this is correct:

DEFAULT nWidth := 25 ,;
                       nHeight :=25


Stefan
kind regards

Stefan
Posts: 840
Joined: Thu Oct 13, 2005 07:05 PM

Error in a class : default variable

Posted: Fri Jan 27, 2006 05:02 PM
Please notice that "DEFAULT" is a command written in the FIVEWIN.CH header file.

If you don't include the FIVEWIN.CH file in you programm you will not have the DEFAULT command available, so the compiling process will fail.

Anyway if you are not using FIVEWIN with your class, you can write the command yourself in the source code or include it in any other header file:

#xcommand DEFAULT <uVar1> := <uVal1> ;
               [, <uVarN> := <uValN> ] => ;
                  <uVar1> := If( <uVar1> == nil, <uVal1>, <uVar1> ) ;;
                [ <uVarN> := If( <uVarN> == nil, <uValN>, <uVarN> ); ]
Saludos

R.F.
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM

Error in a class : default variable

Posted: Fri Jan 27, 2006 11:54 PM

thank to all
this class printer is modified by klm but in xharbout not runned : now run ok

Best Regards, Saludos



Falconi Silvio

Continue the discussion