4D Pack v14AP fopen |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Pack v14
AP fopen
|
AP fopen ( ; mode ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
String |
![]() |
Name of the file or port to be opened | ||||||
mode | Integer |
![]() |
Opening mode 0 = write only 1 = read only | |||||
Function result | Longint |
![]() |
Value to be used with AP FPRINT, or 0 if the file or port cannot be open | |||||
The AP fopen command calls the “fopen” ANSI C command, which enables the opening of serial or parallel ports (on Windows) or the direct creation of files.
The value returned by this function is then used with the AP FPRINT command to write through the port, or to write the file. The opened port or file can then be closed using the command AP FCLOSE.
Note: On Mac OS, this function works only with the direct creation of files.
Writing "hello world" on the parallel port:
Writing "hello world" on the serial port:
Writing "hello world" in a file:
Product: 4D Pack
Theme: 4D_Pack : ANSI Streams
Number:
61979
Created: 4D Pack 6
4D Pack ( 4D Pack v11.4)
4D Pack ( 4D Pack v13.2)
4D Pack ( 4D Pack v12)
4D Pack ( 4D Pack v14 R2)
4D Pack ( 4D Pack v14)
4D Pack ( 4D Pack v14 R3)
4D Pack ( 4D Pack v14 R4)