Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cmonth
Message
From
27/06/1999 22:25:52
 
 
To
27/06/1999 21:57:07
Dovi Gilberd
Dovtware Consulting Inc
Miami, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Cmonth
Miscellaneous
Thread ID:
00233028
Message ID:
00234607
Views:
28
Assuming that your indexes are setup correcly to provide the correct rate entry with the seek. You don't need the FOR..NEXT loop to find the correct rate,

all you need is the followings

return field&rate

This of course assmes that rate is a single character field with the rate that is assigned this customer (ie. 1,2 or 3)

Hope this helps

Norm


>thank you for helping me out with the time diference last week. i wanted to ask you about a problem that im having trying to figure out what rate each call has according to a preset rate. could you please please help me..you helped me last week with the time difference proble...and i also learned how to put a function to work from my main program..
>
>my rate database loook liek this
>code country rate1 rate2 rate 3
>011575 colombia .34 .35 .67
>
>the enduser presets the rate on customer
>Ex. John doe has a rate 2 for all the calls
>he made a call to 011575865755...we know that that call was made to colombia at a rate 2 at the price fo .35 cents..
>
>the first thing i need to do is compare field named long_distance.code(rate)
>with rate table field name rates.code
>the i need to put this condition in it
>
> if left(view1.dialednr,1)="0" && view1.dialednr is fieldname of phone#dialed
> seek left(view1.dialednr,6)
> endif
> if left(view1.dialednr,1)="1"
> seek left(view1.dialednr,4)
> endif
>
>this measn if number dialed starts with cero compare first 6 digits with ratetable fieldname rates.code
>if number dialed starts with 1 then compare first 4 digits with ratetable fieldname rates.code
>
>somewhere in the functions goes this..
>
>
> for n=1 to fcount()
> if field(n)=upper(code)
> return eval(field(n))
> endif
> endfor
> nl=rate
> return rate
> endfunc
>but i dont know...this is supose to tell me what rate is the person using
____________________________________________

Norm Peterson

It's a dog eat dog world out there,
and I'm wear'n milk bone underware!
Previous
Reply
Map
View

Click here to load this message in the networking platform