Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Barbara Peisch
  Where is Barbara Peisch?
 Oceanside
 California - United States
 Barbara Peisch
 To: Don Higgins
  Where is Don Higgins?
 Peoria
 Illinois - United States
 Don Higgins
 Tags
Subject: RE: Source Not Available
Thread ID: 155175 Message ID: 155185 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Thursday, December 27, 2007 1:59:01 AM         
   


> And the hits keep coming...
>
> Now I get an error when I recompile that makes no sense at all.
>
> Compiling c:\racevis9\libs\pro7mainform.vcx
>
> PARAMETERS 108
> Error in line 6076 of mainsportsmanform.calculate_feet_per_second (record 2): Command contains unrecognized phrase/keyword.

>
>
> Here is the code in the Class Method:
>
>
> *******************************
> * Method Name: CalcFeetPerSecond
> * Uses: Calculates Feet Per Second
> * Paremeter is the speed of the vehicle
> * Returns: Ft Per Second Numeric
> *******************************
> LPARAMETERS speed
> Local MilesPerMinute, MilesPerSecond
> 
> MilesPerMinute = speed / 60
> MilesPerSecond = MilesPerMinute / 60
> FeetPerSecond  = MilesPerSecond * 5280
> 
> Return FeetPerSecond
> 
> 

>
> There is nothing in the code as stated by the error message. Again this has not changed in years.
>
> When this code tries to run it generates an error that no parameter statment was found then it runs perfectly.
>
> I copied this code out of the class designer.
>
> I am spinning my wheels here, I take one step forward and 2 steps back on an application that thousands of people have with no problems. Now weirdness sets in.

I'm guessing that you have a #Define for Speed somewhere in this class. I noticed that you're not using standard naming conventions for your variables. The naming convention is meant to avoid this kind of a problem when you might be using a variable name somewhere else. You're also not declaring FeetPerSecond at all. Try changing the code to this instead:

*******************************
* Method Name: CalcFeetPerSecond
* Uses: Calculates Feet Per Second
* Paremeter is the speed of the vehicle
* Returns: Ft Per Second Numeric
*******************************
LPARAMETERS tnSpeed
Local lnMilesPerMinute, lnMilesPerSecond, lnFeetPerSecond

lnMilesPerMinute = tnSpeed / 60
lnMilesPerSecond = lnMilesPerMinute / 60
lnFeetPerSecond  = lnMilesPerSecond * 5280

Return lnFeetPerSecond


-BP
www.peisch.com

ENTIRE THREAD

Source Not Available Posted by Don Higgins @ 12/26/2007 8:00:23 PM
RE: Source Not Available Posted by Tamar Granor @ 12/26/2007 8:13:56 PM
RE: Source Not Available Posted by Don Higgins @ 12/26/2007 8:23:08 PM
RE: Source Not Available Posted by Barbara Peisch @ 12/26/2007 10:42:26 PM
RE: Source Not Available Posted by Don Higgins @ 12/27/2007 1:12:39 AM
RE: Source Not Available Posted by Don Higgins @ 12/27/2007 1:24:35 AM
RE: Source Not Available Posted by Barbara Peisch @ 12/27/2007 1:59:01 AM
RE: Source Not Available Posted by Don Higgins @ 12/27/2007 2:44:09 AM
RE: Source Not Available Posted by Don Higgins @ 12/27/2007 3:25:37 AM