Creating Keywords

I’ve been waiting for someone to create a robotc wrapper. I actually wrote a robotc class several months ago, you could emulate almost exactly a robot program, for example,


#include "v5.h"
#include "robotc.h"

using namespace robotc;

task testTask() {
    int count = 0;
    
    while(1) {
      displayBigStringAt( 10, 90, "Task %d", count++ );
    
      wait1Msec( 500 );
      clearTimer( T1 );
    }
}

int main() {
    writeDebugStreamLine("Hello from v5");

    startTask( testTask );
    
    while(1) {
      motor[0] = vexRT Ch3 ];
      motor[1] = vexRT Ch2 ];
      wait1Msec( 20 );

      int t = time1 T1 ];
      
      displayBigStringAt( 10, 50, "Time %6d %6d", nPgmTime(), t );      
      displayBigStringAt( 10, 10, "Sensor %6d", (int)sensorValue[0] );      
    }

    return 0;
}

would work.

bad news is I have no plans on releasing it, we don’t want to confuse things and prefer everyone to use the new V5 APIs.

In terms of adding keywords, that’s not possible. The tokenizer and VCS language extensions are an integral part of VCS, we generate all the necessary information from the C++ class headers as VCS is built.