Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Assign method problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00381071
Message ID:
00381697
Vues:
17
Right, I see what you mean. I was just working on a class that had a property that has to be a number between 0 and 255. The assert checks it being entered incorrectly at design time and the assign handles it at runtime.

Thanks.

>Yes, you can use asserts exactly like that. In my case it's not really as much a "design time" error as it is a safety valve.
>
>>Right, I thought asserts in that case would be better. In your expample you could just:
>>
>>ASSERT RIGHT(This.MyValue, 1) == '\' ;
>> MESSAGE 'Property MyValue must contain the trailing backslash'
>>
>>In the class init. Now it runs when you are developing and you can turn it off when you compile the finished app.
>>
>>Or am I misunderstanding how asserts are used?
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform