/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        T E S T   D E S   F O N C T I O N S   D E   G E S T I O N   D E   P I L E S  :                                             */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        Author of '$xtKg/pile.02$K' :                                                                                              */
/*                                                                                                                                   */
/*                    Jean-Francois COLONNA (LACTAMME, 1987??????????).                                                              */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        I N T E R F A C E   ' listG '  :                                                                                           */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        :Debut_listG:                                                                                                              */
/*        :Fin_listG:                                                                                                                */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        D I R E C T I V E S   S P E C I F I Q U E S   D E   C O M P I L A T I O N  :                                               */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
@define   PRAGMA_CPP_____MODULE_NON_DERIVABLE

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        F I C H I E R S   D ' I N C L U D E S  :                                                                                   */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#include  INCLUDES_BASE

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        P A R A M E T R E S  :                                                                                                     */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
#define   NOMBRE_DE_REPETITIONS                                                                                                         \
                    DIX                                                                                                                 \
                                        /* Nombre d'entrees a generer.                                                               */
#define   CHIFFRES                                                                                                                      \
                    SIX                                                                                                                 \
                                        /* Nombre de chiffres a generer dans chaque entree de pile.                                  */

/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        T E S T   D E S   F O N C T I O N S   D E   G E S T I O N   D E   P I L E S  :                                             */
/*                                                                                                                                   */
/*************************************************************************************************************************************/
BCommande(nombre_d_arguments,arguments)
/*-----------------------------------------------------------------------------------------------------------------------------------*/
     Bblock
     DEFV(l_element,INIT(POINTERs(descripteur_de_pile),LISTE_UNDEF));
     DEFV(CHAR,INIT(POINTERc(informations),CHAINE_UNDEF));
     DEFV(Float,INIT(pi,PI));
     DEFV(Int,INIT(x_entier,UNDEF));
     DEFV(Float,INIT(x_flottant,FLOT__UNDEF));
     /*..............................................................................................................................*/
     GET_ARGUMENTS_(nombre_d_arguments
                   ,BLOC(VIDE;)
                    );

     CREATION_PILE(descripteur_de_pile);

     Komp(index,NOMBRE_DE_REPETITIONS)
          Bblock
          FpushI(descripteur_de_pile,ADD2(0x00012CF0,index));
          FpushF(descripteur_de_pile,ADD2(pi,index));
          Fpush(descripteur_de_pile,chain_Aconcaten2("VIVE JF. COLONNA ",chain_numero(index,CHIFFRES)));
          Eblock
     EKom

     DESTRUCTION_PILE(descripteur_de_pile);

     Komp(index,NOMBRE_DE_REPETITIONS)
          Bblock
          EGAL(informations,Fpull(descripteur_de_pile));
          EGAL(x_flottant,FpullF(descripteur_de_pile));
          EGAL(x_entier,FpullI(descripteur_de_pile));
          CAL2(Prin3("chaine = %s    pi = %g    index = %08X\n",informations,x_flottant,x_entier));
          EGAL(x_flottant,ZERO);
          EGAL(x_entier,ZERO);
          Eblock
     EKom

     CAL2(Prin0("\n"));

     DESTRUCTION_PILE(descripteur_de_pile);
     DESTRUCTION_PILE(descripteur_de_pile);
     DESTRUCTION_PILE(descripteur_de_pile);

     RETU_Commande;
     Eblock
ECommande



Copyright © Jean-François COLONNA, 2019-2024.
Copyright © CMAP (Centre de Mathématiques APpliquées) UMR CNRS 7641 / École polytechnique, Institut Polytechnique de Paris, 2019-2024.