#46 Syntax error at function call

old
closed-fixed
John Hansen
NXC (53)
5
2009-01-18
2007-12-09
Anonymous
No

Hello,

this small program

//---------- example 1 --------------
int
mal2 (int x)
{
return (x*2);
}

task
main ()
{
int y;

y = mal2 (7);
}
//--------------- EOP -----------------

causes this error with NXC at compile time:

C:\Programme\BricxCC>nbc d:\tmp\ex1.nxc
# Error: Can not assign to a task or subroutine
File "d:\tmp\ex1.nxc" ; line 12
# y = mal2 (7
#----------------------------------------------------------
# Error: ';' expected
File "d:\tmp\ex1.nxc" ; line 12
# y = mal2 (7
#----------------------------------------------------------
# Error: ';' expected
File "d:\tmp\ex1.nxc" ; line 12
# y = mal2 (7);
#----------------------------------------------------------

When deleting the space behind the function call to

y = mal2(7);

no error when compiling occurs.

BR
Detlef

( lego@detlef-lange.de )

Discussion

  • John Hansen
    John Hansen
    2009-01-18

    • status: open --> closed-fixed
     
  • John Hansen
    John Hansen
    2009-01-18

    This is fixed in the current release.