My answer was to escigifprijatelj wrote: Nothing about style
For your concern, I think that any serious compiler would easily get rid of the == .T. part...
Moderator: Rathinagiri
My answer was to escigifprijatelj wrote: Nothing about style
I fully agree.l3whmg wrote:I'm very to read this topic: with other problems we speak about bad syntax.
Anyway, many times I prefer an extended (unusefull?) syntax to show exactly what I means. Many times short syntax creates misunderstanding for a lot of people and I found a lot of this errors.
I never used this IF (a>b) == .T.
Always I prefer "IF ::lCrteated == .T." instead "IF (::lCreated)" ( and this "IF ::lCreate" is wrong: what means? ::lCreate==.T. or ::lCreate==3? You know is a logical var because "l" is used...)
I don't like "RETURN " somewhere (as Esgici write) but it's very usefull in most scenario.
I don't like var name like these: "i", "n", "o", etc when you want to find them.....
I don't like CLIPPER reserved words in lower case
etc., etc.
Cheers
Code: Select all
METHOD OnChange( bValue ) CLASS DATEPICKER
IF PCOUNT() == 0
RETURN ::bOnChange
ELSEIF PCOUNT() == 1
IF hb_IsBlock( bValue ) == .T. <------- Style 1
::bOnChange := bValue
ELSEIF hb_IsNil( bValue ) <-------- Style 2
::bOnChange := bValue
ENDIF
ENDIF
RETURN Self
First let me apologize. I didn't want to offend anybody.So, if you really want to help, can you please provide your knowledge and help to complete any of the above points ?