WriteComm on file

Post Reply
User avatar
Maurizio
Posts: 705
Joined: Mon Oct 10, 2005 1:29 pm
Contact:

WriteComm on file

Post by Maurizio »

Can I write to Com1 as a file ?
Maurizio
User avatar
MarcoBoschi
Posts: 925
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy
Contact:

Re: WriteComm on file

Post 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 
 
Marco Boschi
info@marcoboschi.it
Post Reply