Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TtoD() not working.
Message
De
10/06/1997 19:23:36
 
 
À
10/06/1997 11:16:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00035281
Message ID:
00035885
Vues:
41
Don't agree too much... :))

As I said already in a subsequent message, I've made a mistake and the expression is correctly parantherised:

REPORT FORM repvehicleusage.frx ;
for (
( trim(trip_history.reg_no) = trim(thisform.combo3.value) )
and
( (TtoD(trip_history.time_out) > CtoD(thisform.text1.value) ))
)
Preview

But there is a useless pair of parens for the second operand of the AND operator and a useless pair for the whole expression. More than that, considering that relational operators have a higher priority than AND, all parens are useless except the ones for functions.

And the fact that both of us made the same mistake proves once again that Jim Booth is right: 1st remove the extra parens, than debug the code...

Vlad

>Paul, I agreed with your first message saying that it was not correctly parantherised. Here's the same code indented differently. There is one extra parens at the end or one missing at the begining, isn't it?
>
>REPORT FORM repvehicleusage.frx ;
>for (
> ( trim(trip_history.reg_no) = trim(thisform.combo3.value) )
> and
> ( (TtoD(trip_history.time_out) > CtoD(thisform.text1.value) )
> ))
>Preview
>
>
>Claude.
>
>
>>>> The problem in the example in the thread is that the condition is not correctly parantherised (does this word exist in English? :)).
>>>
>>> Vlad,
>>>
>>>So, based on your comments above, the removal of the parens would fix the problem.
>>
>>As already said, I made a mistake in checking parens... :(
>>
>>>I may have removed them because I couldn't understand them, but in doing that it would fix the problem. <g>
>>
>>This is weird. I never had or saw this problem before. (IE: correct parens always worked fine, no matter if there were useless pairs od parens.)
>>
>>Vlad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform