I'm getting error (57,19) Expected identifier, not "(" when I try to compile my pod.
Code:
comment
etc
blah blah
comment
using statement*7
etc
class Main
{
public Void main()
{
echo("hi")
}
public TermPanel(int columns, int rows, int fontSize) //This is line 57
{
columns := 142
rows := 34
fontSize := 16
}
public World(int width, int height)
{
width := 127
height := 25
}
}
What's the problem?
andyWed 14 Mar 2012
Need to make your int -> Int
Primitives are real objects in Fantom.
brianWed 14 Mar 2012
This line here:
public TermPanel(int columns, int rows, int fontSize)
Has two problems:
missing a return type
int should be Int
So probably want something like this:
Void termPanel(Int columns, Int rows, Int fontSize)
{
}
ikhwanhayatWed 14 Mar 2012
If you intend TermPanel as a method in class Main, then you are missing out the return type. Maybe you meant public Void TermPanel(...).
If you intend it to be a class, than you should declare it as a class, outside of class Main.
PueoWed 14 Mar 2012
Ok, so add Void, int as Int, and it runs. Thanks a lot!
Pueo Wed 14 Mar 2012
I'm getting error
(57,19) Expected identifier, not "("
when I try to compile my pod.Code:
What's the problem?
andy Wed 14 Mar 2012
Need to make your
int -> Int
Primitives are real objects in Fantom.
brian Wed 14 Mar 2012
This line here:
Has two problems:
int
should beInt
So probably want something like this:
ikhwanhayat Wed 14 Mar 2012
If you intend
TermPanel
as a method in classMain
, then you are missing out the return type. Maybe you meantpublic Void TermPanel(...)
.If you intend it to be a class, than you should declare it as a class, outside of class
Main
.Pueo Wed 14 Mar 2012
Ok, so add
Void
,int
asInt
, and it runs. Thanks a lot!