WriteComm on file

WriteComm on file

Postby Maurizio » Fri Aug 30, 2019 4:32 pm

Can I write to Com1 as a file ?
Maurizio
User avatar
Maurizio
 
Posts: 823
Joined: Mon Oct 10, 2005 1:29 pm

Re: WriteComm on file

Postby MarcoBoschi » Mon Sep 02, 2019 7:24 am

Maurizio,
do you mean this?


Code: Select all  Expand view
FUNCTION MAIN()
LOCAL nHandle
LOCAL cBuf
LOCAL nLen
nHandle  := FOPEN( "COM1" , 1 )

? nHandle

cBuf := "ATDT161"
nLen := LEN( cBuf )



? FWRITE( nHandle , @cBuf , nLen )

FCLOSE( nHandle )              
? nHandle

RETURN NIL
 
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: russimicro and 43 guests