Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Type..end type in VB to Visual Fox Pro 9
Message
 
À
07/02/2009 05:28:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
01380003
Message ID:
01380011
Vues:
20
>Hello,
>
>I need to convert this line of code of Visual Basic to Visual Fox Pro...
>
>Type AC_INFO
> nMaxC As Integer
> nMaxR As Integer
> Ctype As Integer
> CStat As Byte
> CSel As Byte
> szRev(10) As Byte
> nLibVer As Integer
> lBaudRate As Long
> End Type
>
>I know there is no equivalent of type...end type command in Visual Fox Pro...thats why i'm stuck on how to convert this to Visual Fox Pro..
>Could anyone help please....Thanks in advance..

I think that is an user defined type.
We can have an equivalent in VFP by using an object, preferable an empty object for efficiency:
AC_INFO = CREATEOBJECT("Empty")
ADDPROPERTY(AC_INFO,"nMaxC",0)
ADDPROPERTY(AC_INFO,"nMaxR",0)
ADDPROPERTY(AC_INFO,"cType",0)
ADDPROPERTY(AC_INFO,"cStat"," ")
ADDPROPERTY(AC_INFO,"cSel"," ")
ADDPROPERTY(AC_INFO,"szRev",SPACE(10)) && I think this is an char(10) but it may be an array of char(1)
ADDPROPERTY(AC_INFO,"lBaudRate",0)
An empty object can also be created as this
CREATE CURSOR temp (nMaxC i, nMaxr i, cType i, cStat c(1), cSel c(1), szRev c(10), lBaudRate N)
SCATTER NAME AC_INFO
USE IN temp

...Y soy feliz, bien feliz, asi lo grito;
Mira, que el mundo sepa, que se sepa:
Soy feliz....                       

...And I'm happy, quite happy, so do I yell it;
Look, so the world knows it, so be known:
I'm happy...
 

Ismael Rivera "Oye cosita linda"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform