#ifndef FORSTRINGS
#include <string.h>
#include <descrip.h>
class FORstring : private dsc$descriptor_s{
public:
FORstring(){
dsc$b_dtype = DSC$K_DTYPE_T;
dsc$b_class = DSC$K_CLASS_S;
dsc$w_length = 0;
dsc$a_pointer = 0;
}
FORstring(char *s){
dsc$b_dtype = DSC$K_DTYPE_T;
dsc$b_class = DSC$K_CLASS_S;
dsc$w_length = strlen(s);
dsc$a_pointer = s;
}
FORstring &operator=(char *s){
dsc$b_dtype = DSC$K_DTYPE_T;
dsc$b_class = DSC$K_CLASS_S;
dsc$w_length = strlen(s);
dsc$a_pointer = s;
return *this;
}
operator char *(){return dsc$a_pointer;}
friend void Ctof(FORstring *fstr, char *s[], int numel){
for(int i=0; i<numel; i++) fstr[i] = s[i];
}
};
#define FORSTRINGS
#endif