Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Emulating Datatypes that are alien to VFP

Status
Not open for further replies.

Benji

Programmer
Jun 26, 2000
3
GB
Hello,<br><br>Does anybody know how to emulate the double datatype found in other languages such as Visual Basic or C, within Visual FoxPro?<br><br>I am trying to fire a method within an ActiveX control that requires parameters created as doubles to be passed.&nbsp;&nbsp;
 
Hi Benji,<br>AFAIK, the double data type, in VFP, is only applicable to fields in a table. So, short of any API calls, try creating a cursor with fields of data type double, populate the fields with the values, and then pass them to the control. Kinda clunky, but worth a shot.<br><br>Example:<br>CREATE CURSOR Buffer (Pad B(15))<br>REPLACE Pad WITH whatever<br>ActiveX.method(Pad)<br><br>Once again, theory & totally untested.<br><br>Jon
 
Along these lines SCATTER NAME OMyRec may work also.&nbsp;&nbsp;So you'd have a reference to oMyRec.myDoubleTypeField <p>John Durbin<br><a href=mailto: > </a><br><a href= > </a><br>ICQ VFP ActiveList #73897253
 
Thanks for your feedback, I already tried passing entries from a type double field, no luck I'm afraid.&nbsp;&nbsp;Setting the parameters passed to 0.0 worked.&nbsp;&nbsp;<br><br>i.e. <br>LOCAL lcDouble1, lcDouble2<br>lcDouble1 = 0.0<br>lcDouble2 = 0.0<br><br>THSIFORM.MyOCX.MethodRequiringDoubles(@lcDouble1, @lcDouble2)<br><br>I was originally passing as an array.&nbsp;&nbsp;<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top