NAG Library Manual, Mark 28.7
Interfaces:  FL   CL   CPP   AD 

NAG CL Interface Introduction
Example description
/* nag_info_impl_details (a00aac) Example Program.
 * Copyright 2022 Numerical Algorithms Group.
 * Mark 28.7, 2022.

#include <nag.h>
#include <stdio.h>
#include <string.h>

int main(void) {
  Integer exit_status = 0;
  unsigned int sizeofpointer = sizeof(void *);
  unsigned int sizeofInteger = sizeof(Integer);
  unsigned int sp, si;

  /* Get the expected sizes of pointers and integers (in bytes) */
  a00aay(&sp, &si);

  printf("nag_info_impl_details (a00aac) Example Program Results\n\n");

  /* Check that the pointer and integer sizes are as expected, and
     issue a warning if not */
  if (sp != sizeofpointer || si != sizeofInteger) {
    if (sp != sizeofpointer)
      printf(" Incorrect value of sizeof(void *)\n"
             "  expected %u, returned %u.\n\n",
             sp, sizeofpointer);
    if (si != sizeofInteger)
      printf(" Incorrect value of sizeof(Integer)\n"
             "  expected %u, returned %u.\n\n",
             si, sizeofInteger);
    printf(" The NAG Library header files are "
           "incompatible with the NAG Library.\n\n");
    printf(" Please check the location of your "
           "NAG Library include files.\n\n");
    exit_status = 1;


  return exit_status;