Help Newibe needs Basic help 
Author Message
 Help Newibe needs Basic help

I have a procedure that I need to run with 2 input
parameters and it will calculate a result for me.  I have
no idea how to do this.  Can some one give me a step by
step?  I know absolutely noting about foxpro.  Using VFP7

thanks.



Fri, 01 Jul 2005 04:04:50 GMT  
 Help Newibe needs Basic help

Quote:
> I have a procedure that I need to run with 2 input
> parameters and it will calculate a result for me.  I have
> no idea how to do this.  Can some one give me a step by
> step?  I know absolutely noting about foxpro.  Using VFP7

> thanks.

A basic sample:

? "2 + 2 = ", CalculateSomething(2,2)

FUNCTION CalculateSomething
LPARAMETER tnValueA, tnValueB
RETURN tnValueA + tnValueB
ENDFUNC

Ofcourse, I think nobody's going to a function like this, but I hope you get
the picture.
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP7



Fri, 01 Jul 2005 04:20:46 GMT  
 Help Newibe needs Basic help
Dave,

As an alternative to Eric's code sample, you can avoid the lparameters line
by using this syntax:

* MyFunction.prg
function MyFunction( pnOne, pnTwo )
return pnOne + pnTwo

--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro


Quote:
> I have a procedure that I need to run with 2 input
> parameters and it will calculate a result for me.  I have
> no idea how to do this.  Can some one give me a step by
> step?  I know absolutely noting about foxpro.  Using VFP7



Fri, 01 Jul 2005 23:19:16 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. HELP,HELP,HELP need help fast

2. Need help - Foxpro/Visual Basic connection

3. Basic help for Win98 and graphics cards needed!

4. I NEED HELP I NEED HELP CUSTOMIZING EXCHANGE 5.0

5. Help needed with ONLINE HELP system inside .EXE file

6. Need Help For Customize Help In Foxpro for Dos 2.5

7. (*.HLP) : Need help to build Windows 3.x Help Files

8. Need more help with HELP!!!!!!

9. HELP! NOVICE NEEDS VFP 5 REPORT HELP

10. Need HTML Help HELP!

11. Help needed to Create Help File !

12. (*.HLP) : Need help to build Windows 3.x Help Files

 

 
Powered by phpBB® Forum Software