Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to send receive binary data though MSCOMM
Message
De
19/10/2007 12:00:14
 
 
À
19/10/2007 10:05:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
01262143
Message ID:
01262179
Vues:
14
>We have a problem that we need to sent binary data though serial port ( MSCOMM )
>
>The output is FOXPRO like :
>
>DIMENSION x(4) as Byte
>x(1) = 0
>x(2) = 4
>x(3) = 253
>x(4) = 249
>*!*x= (00,04,253,249)
>
>thisform.MScomcontrol.output = x
>
>This generates an invalid parameter error because the control only accepts ascii values.
>
>In Visual Basic this works fine.
>
>Suggestions?

Sure - give it character data:
FOR y = 1 TO ALEN(x)
   z = x(y)
  THISFORM.MScomcontrol.OUTPUT = CHR(z)
ENDFOR
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform