RSC/MP 7.2 Programming Manual

HP NonStop Remote Server Call (RSC/MP) Programming Manual522360-004
B-1
B
Language Conversion for RSC/MP
Function Calls
All the function calls documented in this manual use the C language syntax. This
appendix shows how to translate these function calls into other languages.
Data Type Equivalents
Table B-1 lists the COBOL, Pascal, and Visual Basic equivalents for the C data types.
Numeric values passed to RSC/MP functions must be declared as COMP-5 to convert
the byte order to the Intel standard.
Table B-1. Data Types in Other Languages
C COBOL Pascal
Visual
Basic
2
Description
CHAR PIC X ( X ) CHAR STRING Character data.
SHORT PIC S9 ( 4 ) COMP INTEGER
(default)
INTEGER Two-byte signed
numeric.
USHORT PIC 9 ( 4 ) COMP N.A. N.A. Two-byte unsigned
numeric.
LONG PIC S9 ( 8 ) COMP INTEGER4 LONG Four-byte signed
numeric.
ULONG
1
PIC 9 ( 8 ) COMP N.A. N.A. Four-byte unsigned
numeric.
VOID N.A. N.A. N.A. No value. For example,
a VOID return data type
from a function call
means that there is no
return value.
1. Unsigned long words are not available in Visual Basic or Pascal. A signed integer can be substituted, but do
not exceed the range.
2. RSC/MP provides a Visual Basic declaration file, RSC.BAS, that contains the constant, type, and function
declarations supplied in RSC.H.