Common shared error

Forum for discussion about the documentation project.
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Common shared error

Postby sancho2 » Aug 21, 2017 23:25

This little error I came accross today might be a good thing to add to the documentation under keyword "common":

COMMON variables cannot be object instances of CLASS/TYPE's with cons/destructors.
fxm
Posts: 7749
Joined: Apr 22, 2009 12:46
Location: Paris suburb, FRANCE

Re: Common shared error

Postby fxm » Aug 22, 2017 8:27

I already added it with more information more than a year ago (2016-05-28).
Use more recent documentation than the latest official release 1.05.0 (2016-01-31) !!! :-(

See COMMON:
.....
Description:
Declares a variable which is shared between code modules. A matching Common statement must appear in all other code modules using the variable.

Common variables cannot be initialized.
Common arrays are always variable-length, and must be defined with an empty parameter list (), and its dimensions set in a later Dim or Redim statement.
Common variables cannot be instances of a user-defined type having a constructor or a destructor even implicit.

The Shared optional parameter makes the variable global so that it can be used inside subs and functions, as well as at module level.
.....
sancho2
Posts: 547
Joined: May 17, 2015 6:41

Re: Common shared error

Postby sancho2 » Aug 22, 2017 16:58

Lol, oops.
I could have sworn I updated my documentation since then.
And I did go looking for it in the wiki. I wonder how I got this wrong.
Sorry.

Return to “Documentation”

Who is online

Users browsing this forum: No registered users and 1 guest