Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#92 Compiler error with On(Rev,Fwd)SyncPID

compiler
closed-fixed
John Hansen
NXC (53)
5
2011-06-22
2011-03-14
Anonymous
No

Hello,

I am trying to compile the following program under OS X 10.6 with nbc version 1.2 (1.2.1.r3, built Thu Jul 1 08:05:50 CDT 2010):

<snip>
task main()
{
OnRevSyncPID(OUT_AB, 75, -100, 30, 50, 90);
Wait(10000);
}
</snip>

The OnRevSyncPID statement is taken out of the NXC-doc. The OnFwdSyncPID statement produces the same error, which is:
<snip>
nbc -Z1 -sm- motor.nxc -O=motor.rxe
# Error: ',' expected
File "/Users/.../motor.nxc" ; line 3
# OnRevSyncPID(3, 75, -100, 30,
#----------------------------------------------------------
# Error: Math Factor expected
File "/Users/.../motor.nxc" ; line 3
# OnRevSyncPID(3, 75, -100, 30, 50,
#----------------------------------------------------------
# Error: ',' expected
File "/Users/.../motor.nxc" ; line 3
# OnRevSyncPID(3, 75, -100, 30, 50,
#----------------------------------------------------------
# Error: Math Factor expected
File "/Users/.../motor.nxc" ; line 3
# OnRevSyncPID(3, 75, -100, 30, 50, 90)
#----------------------------------------------------------
# Error: ',' expected
File "/Users/.../motor.nxc" ; line 3
# OnRevSyncPID(3, 75, -100, 30, 50, 90)
#----------------------------------------------------------
# Error: Math Factor expected
File "/Users/.../motor.nxc" ; line 4
# W
#----------------------------------------------------------
# Error: ')' expected
File "/Users/.../motor.nxc" ; line 4
# W
#----------------------------------------------------------
# Error: ';' expected
File "/Users/.../motor.nxc" ; line 4
# Wait(
#----------------------------------------------------------
make: *** [motor.rxe] Error 1
</snip>

Note: I added the "..." in the Filenames to make the lines shorter. the full filename is given by the compiler as error.

Cheers,
mrnice

Discussion

  • John Hansen
    John Hansen
    2011-06-22

    • status: open --> closed-fixed
     
  • John Hansen
    John Hansen
    2011-06-22

    This bug has been fixed in the latest SVN code for NBC/NXC. The fix will be included in the next official compiler release (1.2.1 r5)