Page 1 of 1

WriteComm on file

Posted: Fri Aug 30, 2019 4:32 pm
by Maurizio
Can I write to Com1 as a file ?
Maurizio

Re: WriteComm on file

Posted: Mon Sep 02, 2019 7:24 am
by MarcoBoschi
Maurizio,
do you mean this?

Code: Select all

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