文本 * 而不是字符 *
我正在查看一些使用 Oracle OCI 的代码,并且遇到了一些我以前从未见过的东西。代码如下:
text *string;
现在,string 的作用与 char * 完全相同,但我从未见过数据类型 text。
有人知道我在哪里可以找到 text 数据类型的声明/定义位置吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您必须在 Oracle 文档中查找它。或者,如果您有一个允许您访问定义的 IDE,您也许可以轻松找到定义并自行查找。
C 和许多其他语言允许开发人员定义新的数据类型,并且它们没有中央存储库或普遍接受的含义。您需要根据具体情况找出它们的含义。
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.
谷歌搜索让我到达 http://www .cs.umbc.edu/portal/help/oracle8/server.815/a67846/datatype.htm
我看到:
并且
不确定这与您的情况有多么相关......
A google search landed me at http://www.cs.umbc.edu/portal/help/oracle8/server.815/a67846/datatype.htm
There I see:
and
Not sure how relevant this is to your situation ...
您可以递归地搜索头文件以查找其定义。它可能类似于
typedef char text
,或者不太可能是#define text char
。您没有提到您正在使用的编译器,但可能有某种方法可以在预处理阶段之后停止 - 这将允许您只搜索预处理阶段的输出以查找定义,而不是递归搜索所有头文件。在 gcc 中,您可以使用 gcc -E 。
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
.