gra_decode_ xxx()

Format:
int gra_decode_double( char $*$string, double $*$x)
int gra_decode_float( char $*$string, float $*$x)
int gra_decode_int( char $*$string, int $*$i)
int gra_decode_text( char $*$string, char $*$string_out)
Description:
These functions evaluate scalar arithmetic expressions and text expressions. The input strings consist of constants, symbols and functions -- any valid expression. The functions return 1, if they completed successfully, otherwise 0. The result can be a floating point number, an integer or a text string.

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); 
  ...
}