Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Emulating Datatypes that are alien to VFP

Emulating Datatypes that are alien to VFP

Emulating Datatypes that are alien to VFP


Does anybody know how to emulate the double datatype found in other languages such as Visual Basic or C, within Visual FoxPro?

I am trying to fire a method within an ActiveX control that requires parameters created as doubles to be passed.  

RE: Emulating Datatypes that are alien to VFP

Hi Benji,
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.

CREATE CURSOR Buffer (Pad B(15))
REPLACE Pad WITH whatever

Once again, theory & totally untested.


RE: Emulating Datatypes that are alien to VFP

Along these lines SCATTER NAME OMyRec may work also.  So you'd have a reference to oMyRec.myDoubleTypeField

John Durbin

ICQ VFP ActiveList #73897253

RE: Emulating Datatypes that are alien to VFP

Thanks for your feedback, I already tried passing entries from a type double field, no luck I'm afraid.  Setting the parameters passed to 0.0 worked.  

LOCAL lcDouble1, lcDouble2
lcDouble1 = 0.0
lcDouble2 = 0.0

THSIFORM.MyOCX.MethodRequiringDoubles(@lcDouble1, @lcDouble2)

I was originally passing as an array.  

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close