Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Xbase DO CASE indention
Message
Information générale
Forum:
Humor
Catégorie:
Autre
Divers
Thread ID:
01564657
Message ID:
01564775
Vues:
34
>>>I propose a new law that says everyone who does not indent the CASE lines in a DO CASE...ENDCASE should be fined $1500 per instance.
>>>
>>>:-)
>>
>>
>>IF I could get just $1 for each instance of code that I do not like it, I would be rich, RICH!
>>
>>The most expensive fine I would deal would be for those coders that use ELSE instead of OTHERWISE in a case statement, it is JUST PLAIN WRONG!!! :)
>
>
>I did not even know you could do that. I tried it just now and it compiled without error, but it seems like it's dead code that's never accessed. The behavior was different than OTHERWISE.
>
>What does an ELSE do in a DO CASE?

Well, as I said, it is plain wrong :) (but I saw code that uses ELSE several times, unfortunately no error it just ignores it making difficult to debug)
do case
	case .f.
		? 'False'
	*otherwise
	else
		? 'True'
endcase
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform