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: 825
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  RUN
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: 1066
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 74 guests