idljava的简单介绍

博主:adminadmin 2022-12-27 21:48:07 69

今天给各位分享idljava的知识,其中也会对进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

JAVA 调用 IDL Attempt to call undefined procedure/function

Compiling Your Program

Before a procedure or function can be executed, it must be compiled. When a system routine (a function or procedure built into IDL, such as iPLOT) is called, either from the command line or from another procedure, IDL already knows about this routine and compiles it automatically. When a user-defined function or procedure is called, IDL must find the routine and then compile it. Compilation can be either automatic or manual, as described below.

Warning

User-written functions must be defined before they are referenced, unless they:

1) Exist in the IDL !PATH.

2) Exist in a .pro file named the same as the function.

3) Are reserved using the FORWARD_FUNCTION statement.

This restriction is necessary in order to distinguish between function calls and subscripted variable references. See About Calling and Compiling Functions for details.

Automatic Compilation

When you enter the name of an uncompiled user-defined routine at the command line or call the routine from another routine, IDL searches the current directory for filename.pro, thenfilename.sav, where filename is the name of the specified routine. If no file is found in the current directory, IDL searches each directory specified by !PATH. (For more on the IDL path, see!PATH.)

If no file matching the routine name is found, IDL issues an error:

% Attempt to call undefined procedure/function: 'routine'

where routine is the name of the routine you specified.

If a file is found, IDL automatically compiles the contents of the file up to the routine whose name matches the name of the file (excluding the suffix), and then executes the routine. If the file does not contain the definition of a routine whose name matches the name of the file, IDL issues the same error as when the no file with the correct name is found.

For example, suppose a file named proc1.pro contains the following procedure definitions:

PRO proc1 PRINT, 'This is proc1' END PRO proc2 PRINT, 'This is proc2' END PRO proc3 PRINT, 'This is proc3' END

If you enter proc1 at the IDL command line, only the proc1 procedure will be compiled and executed. If you enter proc2 or proc3 at the command line, you will get an error informing you that you attempted to call an undefined procedure.

In general, the name of the IDL program file should be the same as the name of the last routine within the file. This last routine is usually the main routine, which calls all the other routines within the IDL program file (or, in the case of object classes, the class definition). Using this convention for your IDL program files ensures that all the related routines within the file are compiled before being called by the last main routine.

Program files within the IDL distribution use this formatting style. For example, open the program file for the XLOADCT procedure, xloadct.pro, in the IDL Editor. This file is in the lib/utilitiessubdirectory of the IDL distribution. This file contains several routines. The main routine (XLOADCT) is at the bottom of the file. When this file is compiled, the IDL Output Log notes all the routines within this file that are compiled:

IDL .COMPILE XLOADCT % Compiled module: XLCT_PSAVE. % Compiled module: XLCT_ALERT_CALLER. % Compiled module: XLCT_SHOW. % Compiled module: XLCT_DRAW_CPS. % Compiled module: XLCT_TRANSFER. % Compiled module: XLOADCT_EVENT. % Compiled module: XLOADCT.

Note that the main XLOADCT procedure is compiled last.

Tip

When editing a program file containing multiple functions and/or procedures in the IDL Editor, you can easily move to the desired function or procedure by selecting its name from the Functions/Procedures Menu. See Navigating Among Procedures and Functions for more information.

Manual Compilation

There are several ways to manually compile a procedure or function.

Use the .COMPILE executive command at the IDL command line:

.COMPILE myFile

where myFile is the name of a .pro file located either in IDL's current working directory or in one of the directories specified by !PATH. All the routines included in the specified file will be compiled, but none will be executed automatically. If you are using the IDL Development Environment, the .pro file will also be opened in the IDL Editor.

If the file is open in the IDL Editor, select Run Compile or click the Compile button on the toolbar. All routines within the file will be compiled, but none will be executed automatically.

Use the .RUN or .RNEW executive command at the IDL command line:

.RUN myFile

where myFile is the name of a .pro file located either in IDL's current working directory or in one of the directories specified by !PATH. All the routines included in the specified file will be compiled, and any $MAIN$ level programs will be executed automatically. If you are using the IDL Development Environment, the .pro file will also be opened in the IDL Editor.

Use the .RUN, .RNEW, or .COMPILE executive command with no filename argument. Invoking any of these executive commands with no filename allows you to interactively create and compile a $MAIN$ level program. See Creating $MAIN$ Programs for additional details.

Note

Only .pro files can be compiled using the manual compilation mechanisms. Attempting to compile a SAVE (.sav) file using one of these mechanisms will result in an error.

In the "Hello World" example shown in Compiling Your Program, we have a user-defined procedure that contains a call to a user-defined function. If you enter the name of the user-defined procedure, hello_main, at the command line, IDL will compile and execute the hello_main procedure. After you provide the requested input, a call to the hello_who function is made. IDL searches forhello_who.pro, and compiles and executes the function.

Compilation Errors

If an error occurs during compilation, the error is reported in the Output Log of the IDLDE. For example, because the END statement is commented out, the following user-defined procedure will result in a compilation error:

PRO procedure_without_END PRINT, 'Hello World' ;END

When trying to compile this procedure (after saving it into a file namedprocedure_without_END.pro), you will receive the following error in the IDL Output Log:

IDL .COMPILE procedure_without_END % End of file encountered before end of program. % 1 Compilation errors in module PROCEDURE_WITHOUT_END.

Note

Under Microsoft Windows, the IDL Editor window displays a red dot to the left of each line that contains an error.

Setting Compilation Options

The COMPILE_OPT statement allows you to give the IDL compiler information that changes some of the default rules for compiling the function or procedure within which the COMPILE_OPT statement appears. The syntax of COMPILE_OPT is as follows:

COMPILE_OPT opt1 [,opt2, ..., optn]

where optn is any of the available options documented in COMPILE_OPT. These options allow you to change default values of true and false, hide routines from HELP, and reserve the use of parentheses for functions. See COMPILE_OPT for complete details.

JAVA IDL 服务器工具 是什么?

Java

IDL即idltojava编译器就是一个ORB,可用来在Java语言中定义、实现和访问CORBA对象。Java

IDL支持的是一个瞬间的CORBA对象,即在对象服务器处理过程中有效。实际上,Java

IDL的ORB是一个类库而已,并不是一个完整的平台软件,但它对Java

IDL应用系统和其他CORBA应用系统之间提供了很好的底层通信支持,实现了OMG定义的ORB基本功能。

Java中IDL是什么?

Java IDL(Interface Definition Language,接口定义语言)为 JavaTM 平台添加了 CORBA(Common Object Request Broker Architecture,公用对象请求代理体系结构)功能,从而可提供基于标准的互操作性和连接性。Java IDL 使分布式、支持 Web 的 Java 应用程序可利用 Object Management Group 定义的行业标准 OMG IDL(Object Management Group Interface Definition Language,对象管理组接口定义语言)及 IIOP(Internet Inter-ORB Protocol,Internet对象请求代理间协议)来透明地调用远程网络服务。

java与IDL之间的关系是什么?

接口定义语言(Interface Definition Language)的缩写,使用Java(TM)编写的API提供基于标准的和CORBA的交互性和连接性.

应该是类似com组件的。详细的请看这里

关于idljava和的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。

The End

发布于:2022-12-27,除非注明,否则均为首码项目网原创文章,转载请注明出处。