Calls to math services from different languages

Table 1 shows sample calls to the Language Environment math service CEESLOG—logarithm base e, as made from C/C++, COBOL, and PL/I. For more examples, see Examples of math services.
Table 1. Examples of calls to CEESLOG
Called from Code example
C/C++
#include <leawi.h>
#include <string.h>
#include <stdio.h>

int main (void) {

  float int1, intr;

  _FEEDBACK fc;
  #define SUCCESS "\0\0\0\0"

  int1 = 39;
  CEESSLOG(&int1,&fc,&intr);

  if (memcmp(&fc,SUCCESS,4) != 0) {
     printf("CEESSLOG failed with message number %d\n",
            fc.tok_msgno);
     exit(2999);
  }

  printf("Log base e of %f is %f\n",int1,intr);
}
COBOL
⋮
    77   ARG1RS  COMP-1.
    77   FBCODE  PIC X(12).
    77   RESLTRS COMP-1.

         CALL "CEESSLOG" USING ARG1RS , FBCODE , RESLTRS.
⋮
PL/I
⋮
DCL ARG1 RESULT REAL FLOAT DEC (6);
DCL FC   CHARACTER (12);

CALL CEESSLOG (ARG1, FC, RESULT)
⋮