May 04, 2024, 10:27:22 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


My window program fails to compile

Started by Bruce Peaslee, December 15, 2005, 02:14:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bruce Peaslee

December 15, 2005, 02:14:22 PM Last Edit: February 25, 2006, 11:32:26 AM by peaslee
I'm starting from scratch to try and get a feel for this, but my first little effort fails to compile:


#AutoDefine "Off"

Declare Import, GetSysColor(index as int),int;

class myWindow : cwindow
{
// Overridden functions
declare OnClose(),ÂÃ,  int;
declare OnCreate(), int;
// Variables
def run as int;
}

myWindow::OnClose(), int
{
Destroy();
run = 0;
Return 0;
}

myWindow::OnCreate(), int
{
run = 1;
CenterWindow();
Return True;
}

global sub main()
{
myWindow winMain;
winMain.Create(0,0,300,300,
AWS_CAPTION|AWS_VISIBLE|AWS_BORDER|AWS_SYSMENU|AWS_AUTODRAW|AWS_SIZE,
0,"The Hood",NULL);
winMain.SetWindowColor(GetSysColor(15));
do
{
wait();
}
until winMain.run = 0;
return;
}


The error isÂÃ,  { } mismatch - }

but they look matched to meÂÃ,  ÂÃ, :P
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

Ionic Wind Support Team

The actual keyword is

} until

The newline is causing the problem.

Paul.
Ionic Wind Support Team

Bruce Peaslee

Thanks, works fine now.

Peculiar syntax. I did notice that you were running together the brace and the "until", but I thought it was stylistic.
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

Ionic Wind Support Team

Ionic Wind Support Team

Bruce Peaslee

Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles

Ionic Wind Support Team

Ionic Wind Support Team

Bruce Peaslee

Right. I put a space there and it worked, but new line still fails.
Bruce Peaslee
"Born too loose."
iTired (There's a nap for that.)
Well, I headed for Las Vegas
Only made it out to Needles