Page 1 of 1

Q & A

PostPosted: Sat Oct 10, 2009 1:54 pm
by Charles
I received some questions in email, but I prefer to answer them here for everyone:

-- How to initialize a member variable and make it private?

First, you can rely on the fact that double underscored methods are automatically private. If that does not suit you, put "is private" on the next line. Note that the keyword "is" also works as an operator in expressions, so it's too ambiguous to put on the same line.
class X

var __a = 5

var _b = 3
is private

Someday we'll have the following, like we do for shared:
class X

private

var _a = 5
var _b = 3


-- Where is the 'KeywordSpecs' class?

workspace/Source/KeywordSpecs.cobra which you can browse online


--What is the license of the intermediate C# code? Who is considered the author?

You own the generated code (and your original source code) so your project can be any license you want including commercial, public domain, any open source, etc.

Re: Q & A

PostPosted: Tue Oct 13, 2009 5:24 pm
by hopscc
re:
Note that the keyword "is" also works as an operator in expressions, so it's too ambiguous to put on the same line.


Theres a new (latest) patch on ticket:34 that corrects that ambiguity without any change in the keyword syntax
allowing the (obvious) use of an 'is clause' on the same line - see monologue alongside the patch on the ticket.