Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on function
Message
From
21/06/1999 17:27:04
 
 
To
21/06/1999 15:09:58
Dovi Gilberd
Dovtware Consulting Inc
Miami, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00232121
Message ID:
00232219
Views:
23
Dovi,

You have a function called RESULT, one of the parameters is called RESULT, and possibly the invokation uses RESULT too.

Try changing them so that only one RESULT remains.

Good luck,

Jim N

>thank you
>my function looks like this...is there anything wrong with it..
>i did what you told me but it does not work..its gives me result of 0.
>i know that the formula its calculating the times perfectly...
>can you giveme a hand with this matter please
>
>
>********************************************************************************
>function result() && Function to calculate time diference
>********************************************************************************
>parameters hrs1, min1, sec1, hrs2, min1, sec2, timesec1, timesec2, finaltime, timediff, result
>
>local answertime, endtime
>
>Hrs1 = VAL(SUBSTR ( answertime, 1, 2 ))
>Min1 = VAL(SUBSTR ( answertime, 3, 2 ))
>Sec1 = VAL(SUBSTR ( answertime, 5, 2 ))
>
>Hrs2 = VAL(SUBSTR ( endtime, 1, 2 ))
>Min2 = VAL(SUBSTR ( endtime, 3, 2 ))
>Sec2 = VAL(SUBSTR ( endtime, 5, 2 ))
>
>Time1Sec = ( 60 * 60 * Hrs1 ) + ( 60 * Min1 ) + Sec1
>Time2Sec = ( 60 * 60 * Hrs2 ) + ( 60 * Min2 ) + Sec2
>
>TimeDiff = Time2Sec - Time1Sec
>
>IF Hrs2 < Hrs1
> TimeDiff = (Time2Sec+(86400)) - Time1Sec
>ENDIF
>
>finaltime = (TimeDiff/60)+ 0.1
>
>IF finaltime < .6
> finaltime=.5
>ENDIF
>
>result= round(finaltime,1)
>&&store result to result
>return result
>EndFunc
Previous
Reply
Map
View

Click here to load this message in the networking platform