FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour WriteComm on file
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
WriteComm on file
Posted: Fri Aug 30, 2019 04:32 PM

Can I write to Com1 as a file ?
Maurizio

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: WriteComm on file
Posted: Mon Sep 02, 2019 07:24 AM
Maurizio,
do you mean this?


Code (fw): Select all Collapse
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
Marco Boschi
info@marcoboschi.it

Continue the discussion