/*************************************************************************************************************************************/ /* */ /* P A R T I E D E C I M A L E D ' U N N O M B R E : */ /* */ /* */ /* Author of '$xcg/DECI.01$K' : */ /* */ /* Jean-Francois COLONNA (LACTAMME, 20081229114022). */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* 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 : */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* F I C H I E R S D ' I N C L U D E S : */ /* */ /*************************************************************************************************************************************/ #include INCLUDES_MINI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* P A R A M E T R E S : */ /* */ /*************************************************************************************************************************************/ #define NOMBRE_0 \ FZERO \ /* Nombre dont on veut la partie decimale. */ #define NOMBRE_DE_DECIMALES \ DOUZE \ /* Definition du nombre de chiffres a editer (nom compris le point decimal...). ATTENTION, */ \ /* ce n'est pas le nombre de decimales, mais le nombre total de chiffres, y compris donc la */ \ /* partie entiere lors de l'utilisation du format "%g". */ #include xcg/ARIT.01.I" #include xci/valeurs.01.I" /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M A C R O S U T I L E S : */ /* */ /*************************************************************************************************************************************/ #include xci/valeurs.02.I" /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* P A R T I E D E C I M A L E D ' U N N O M B R E : */ /* */ /*************************************************************************************************************************************/ BCommande(nombre_d_arguments,arguments) /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(Float,INIT(nombre,NOMBRE_0)); /* Nombre dont on veut la partie decimale. */ #include xci/valeurs.03.I" /*..............................................................................................................................*/ GET_ARGUMENTS_(nombre_d_arguments ,BLOC(PROCESS_ARGUMENT_F("x=""nombre=""n=""a=",nombre ,BLOC(DETECTION_DE_PRESENCE_D_UN_ARGUMENT_OBLIGATOIRE;) ,BLOC(VIDE;) ); PROCESS_ARGUMENTS_DE_PARAMETRAGE_DE_LA_GENERATION_DE_SUITE_DE_VALEURS_1; PROCESS_ARGUMENTS_DE_PARAMETRAGE_DE_LA_GENERATION_DE_SUITE_DE_VALEURS_2; ) ); begin_nouveau_block Bblock DEFV(Float,INIT(partie_entiere__de_nombre,fINTE(nombre))); DEFV(Float,INIT(partie_decimale_de_nombre,DECI(nombre))); /* Parties entiere et decimale du nombre... */ Test(IFNE(nombre,ADD2(partie_entiere__de_nombre,partie_decimale_de_nombre))) /* Validation introduite le 20090105095750... */ Bblock PRINT_ERREUR("la decomposition du nombre en parties entiere et decimale est incorrecte"); CAL1(Prer1("(nombre-(PartieEntiere+PartieDecimale)=%g)\n" ,SOUS(nombre,ADD2(partie_entiere__de_nombre,partie_decimale_de_nombre)) ) ); Eblock ATes Bblock Eblock ETes EDITION_DE_LA_VALEUR_DE_L_OPERATEUR(partie_decimale_de_nombre); /* Edition de la partie decimale du nombre... */ Eblock end_nouveau_block RETU_Commande; Eblock ECommande