[solved] docu about open com must be changed.

Forum for discussion about the documentation project.
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

[solved] docu about open com must be changed.

Postby D.J.Peters » Dec 29, 2016 20:51

declare function Open Com ( byref options as string, AS filenum as long ) as long

The result of var hFile = FreeFile() has the same size as a pointer (a handle from OS)

open com are declared as long (32-bit) but should be integer (32/64-bit)

Joshy
Last edited by D.J.Peters on Oct 16, 2017 2:44, edited 1 time in total.
fxm
Posts: 8167
Joined: Apr 22, 2009 12:46
Location: Paris suburb, FRANCE

Re: docu about open com must be changed.

Postby fxm » Dec 29, 2016 22:25

Not agree:

Code: Select all

#print typeof(Open Com("COM1:9600,N,,2" As 1))
#print typeof(freefile())
    LONG
    LONG
D.J.Peters
Posts: 7419
Joined: May 28, 2005 3:28

Re: docu about open com must be changed.

Postby D.J.Peters » Dec 30, 2016 2:36

You are right FreeBASIC does not use real file handles my fault :-(
you get it only with Declare Function FileAttr ( ByVal filenum As Long, ByVal returntype As Long = 1 ) As Integer

Joshy

Return to “Documentation”

Who is online

Users browsing this forum: No registered users and 1 guest