Example:
main( int argc, char *args[]) { int i, j; float x; char buffer[80]; /* the initialization function */ gra_init( argc, args); ... /* translate a symbol and interpret is as an integer number */ gra_decode_int( "count", &i); /* find out how many markers have been set and get the first one */ gra_decode_int( "n_marker()", &i); gra_decode_int( "marker(1)", &j); /* find out whether BPU1 exists and if it does, get the number of points */ gra_decode_int( "search_scan(bpu1)", &i); if( i) { gra_decode_int( "curr( bpu1)", &j); } /* get the smallest x-value of BPU1 */ gra_decode_float( " x_min(bpu1)", &x); /* translate a symbol and leave it as a text string */ gra_decode_text( "symbol_1", buffer); /* get the first comment line of BPU1 */ gra_decode_text( "comment( bpu1, 1, *)", buffer); /* fetch the current date and time */ gra_decode_text( "date_and_time()", buffer); ... }