EasyC V4 - Pointers and References as function arguments?

I was wondering if it was possible to use a reference or pointer as an argument to a function in EasyC V4?

For example:
void MyFunction (char &a,char &b)
{
a=5
b=10
}
In this case, I would like it so that whatever variables i used for the arguments would end up containing 5 and 10 respectively.

Thanks

EDIT//

Also, does EasyC include some kind of function like
IsOperatorControl();
or
IsAutonomous();
that tells you what mode the robot is in?

Yes, it’s standard C syntax.

void
MyFunction( int *a, int *b )
{
    *a = 5;
    *b = 10;
}

int
main()
{
    int AA, BB;

    MyFunction( &AA, &BB );

    printf("AA is %d, BB is %d\n", AA, BB );
}

Thank you, that helps a ton!
As far as my second question goes, is there any built in function that identifies if the robot is in aunonomous or operator control? I’m loooking for something like the IsEnabled() function.

There is an IsAutonomous() function (undocumented) that may work, otherwise set a global variable at the start of autonomous or operator control functions.

Do you know if IsAutonomous() is true even if the robot is disabled? Or is it only true when the robot is enabled and in autonomous mode? I just don’t have a cortex at home to test it with.

I don’t know, will try later if I have time. For ROBOTC the driver/auto flag always reverts to auto if the robot is disabled.

Edit:

Ok, tried it, used the following code (copied from the flowcharts)

#include "Main.h"

void Initialize ( void )
{
      while ( !IsEnabled() )
          {
          Wait ( 250 ) ;
          PrintToScreen ( "Enabled = %d, Auto = %d\n" , IsEnabled(), IsAutonomous() ) ;
          }
}
void Autonomous ( unsigned long ulTime )
{
      Wait ( 1000 ) ;
      PrintToScreen ( "Enabled = %d, Auto = %d\n" , IsEnabled(), IsAutonomous() ) ;
      while ( 1 )
          {
          Wait ( 1000 ) ;
          PrintToScreen ( "Enabled = %d, Auto = %d\n" , IsEnabled(), IsAutonomous() ) ;
          }
}
void OperatorControl ( unsigned long ulTime )
{
      Wait ( 1000 ) ;
      PrintToScreen ( "Enabled = %d, Auto = %d\n" , IsEnabled(), IsAutonomous() ) ;
      while ( 1 )
          {
          Wait ( 1000 ) ;
          PrintToScreen ( "Enabled = %d, Auto = %d\n" , IsEnabled(), IsAutonomous() ) ;
          }
}

and added this prototype to UserIncludes.h


unsigned char IsAutonomous(void)

The function returns 0 during OperatorControl and 1 during Autonomous, it always returns 0 during Initialize so will not tell you what is going to happen when the robot becomes enabled. This is the same behavior as ROBOTC so is probably determined by the master processor.

Thanks! That information helps a bunch