Iniciar sesión:
Votos - , Puntuación media: ( )

Manual de usuario HP, modelo HP Integrity NonStop H-Series

Fabricar: HP
Tamaño del archivo: 6.4 mb
Nombre del archivo:

Idioma del manual:itenesfrnlptro

El documento se está cargando, por favor, espere
El documento se está cargando, por favor, espere


Otros manuales para este modelo:

Resumen del manual


Calling Other Programs and Routines
Passing Parameters to Non-COBOL Routines
Example 23-5. Using Reference Parameters to Pass Integers to C Routine
HP COBOL code:
01 PARAMS.
03 PAR1 USAGE IS NATIVE-2.
03 PAR2 USAGE IS NATIVE-4.
03 PAR3 USAGE IS NATIVE-8.
01 SQ USAGE IS NATIVE-8.
...
ENTER C "blog" USING PAR1 PAR2 PAR3 GIVING SQ
...
C code:
long long blog (int *a, long *b, long long *c)
{
long long result;
...
result = *a * *b * *c;
c = 25;
return result;
}
In Example 23-6, an HP COBOL program uses external declarations to pass integer
data items to a C routine.
Example 23-6. Using External Declarations to Pass Integers to C Routine
External declarations in HP COBOL:
01 FLIP USAGE IS NATIVE-2 EXTERNAL.
01 FLAP USAGE IS NATIVE-4 EXTERNAL.
01 FLOP USAGE IS NATIVE-8 EXTERNAL.
C code:
extern short FLIP;
extern long FLAP;
extern long long FLOP;
FLOP = (long long)((long)FLIP * FLAP);
Example 23-7. Passing a String to a C Routine (page 1 of 2)
HP COBOL code:
DATA DIVISION.
WORKING-STORAGE SECTION.
01 A-STRING PICTURE X(25).
...
PROCEDURE DIVISION.
...
ENTER C "FUNCT1" USING A-STRING
HP COBOL Manual for TNS/E Programs 520347-003
23 -23


...

Comentarios



Tu reseña
Tu nombre:
Introduzca dos números de la imagen:
capcha





Categoría