[solved] docu about open com must be changed.

Forum for discussion about the documentation project.
Post Reply
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

[solved] docu about open com must be changed.

Post by D.J.Peters »

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
Moderator
Posts: 12106
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: docu about open com must be changed.

Post by fxm »

Not agree:

Code: Select all

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

Re: docu about open com must be changed.

Post by D.J.Peters »

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
Post Reply