FT_COM3OR4() Enable use of COM3 and/or COM4 on IBM/PC compatibles. Syntax FT_COM3OR4( <nPort> ) -> lSuccess Arguments <nPort> is the COM port to enable. Ports except 3 and 4 are ignored. The default is 3. Returns a logical indicating success or failure of the operation. Description FT_COM3OR4() uses FT_POKE() to write to memory the correct data to enable COM3 or COM4 on IBM-PC compatables. The programmer will still need to explicitly open the port with SET PRINTER or FOPEN() to send data out the port. FT_COM3OR4() owes everything to FT_POKE(). Examples // attempt to enable COM3 IF FT_COM3OR4( 3 ) Qout("COM3 was enabled") END Source: COM34.PRG
Tag Archives: C5_FOPEN
FT_TEMPFIL
FT_TEMPFIL() Create a file with a unique name Syntax FT_TEMPFIL( [ <cPath> ] [, <lHide> ] ) -> cFileSpec Arguments <cPath> is the directory where you want to create the temporary file. If you omit this argument, the root of the current drive is assumed ("\"). If <lHide> is .T., then the file will be created with the hidden attribute set. The default is .F. Returns <cFileSpec> should be your path, including the name of the newly created unique file. Use this with FOPEN(), etc. If a DOS error occurred when trying to create the file, a null string will be returned. Description This function uses DOS Interrupt 21, service 5Ah (Create temporary file) to create a unique filename in a directory you specify. There will be no extension. After the file is created, you may then fopen() it and do any i/o you need (see the test driver in the source code). This function requires FT_INT86(). Examples Create a unique file in the root of the current drive: myFile := FT_TEMPFIL() Create a unique file in the current directory and hide it: myFile := FT_TEMPFIL(".\", .t.) Create a unique file on another drive, but do not hide it: myFile := FT_TEMPFIL("e:\nanfor\src\") Source: TEMPFILE.PRG Author: Glenn Scott