Frage

I'm going through some code that uses the Oracle OCI and I've come across something I haven't seen before. The code is like this:

text *string;

Now, string acts exactly like a char * but I've never seen the datatype text.

Anyone know where I can find where the text datatype is declared/defined?

War es hilfreich?

Lösung

A google search landed me at http://www.cs.umbc.edu/portal/help/oracle8/server.815/a67846/datatype.htm

There I see:

#if !defined(LUSEMFC)
# ifdef lint
#  define text unsigned char
# else
   typedef OraText text;
# endif
#endif

and

#ifdef lint
# define OraText unsigned char
#else
  typedef  unsigned char OraText;
#endif

Not sure how relevant this is to your situation ...

Andere Tipps

You'd have to look it up in the Oracle documentation. Alternately, if you have an IDE that will allow you to go to definitions, you might be able to find the definition easily and look for yourself.

C and many other languages allow the developer to define new datatypes, and there is no central repository or generally accepted meaning for them. You need to find their meanings on a case-by-case basis.

You'll could recursively search through the header files for its definition. It will probably be something like typedef char text or less likely, #define text char.

You didn't mention what compiler you are using, but there may be some way to stop after the preprocessing stage - this would allow you to just search the output of the preprocessing stage for the definition rather than recursively searching all header files. In gcc, you can use gcc -E.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top