/* access element of a string */
#include <stdio.h>
#include <string.h>
#include <chshell.h>

int g;
int main() {
  int i;

  printf("iskey(\"sin\") = %d\n", iskey("sin"));
  printf("iskey(\"int\") = %d\n", iskey("int"));
  printf("iskey(\"=\") = %d\n", iskey("="));
  printf("iskey(\"unknown\") = %d\n", iskey("unknown"));

  printf("isstudent() = %d\n", isstudent());

  printf("isvar(\"i\") == CH_NOTVAR = %d\n", isvar("i") == CH_NOTVAR);
  printf("isvar(\"NaN\") == CH_SYSTEMCONST = %d\n", isvar("NaN") == CH_SYSTEMCONST);
  printf("isvar(\"_path\") == CH_SYSTEMVAR = %d\n", isvar("_path") == CH_SYSTEMVAR);
  printf("isvar(\"g\") == CH_EXTERNVAR = %d\n", isvar("g") == CH_EXTERNVAR);
  printf("isvar(\"isvar\") == CH_EXTERNFUN = %d\n", isvar("isvar") == CH_EXTERNFUN);
  printf("isvar(\"unknown\") = %d\n", isvar("unknown"));
}
