--- rpl/src/instructions_t3.c 2010/09/23 15:27:40 1.17 +++ rpl/src/instructions_t3.c 2011/06/21 15:26:34 1.25 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.0.20 - Copyright (C) 1989-2010 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.0.prerelease.2 + Copyright (C) 1989-2011 Dr. BERTRAND Joël This file is part of RPL/2. @@ -896,4 +896,77 @@ instruction_tokenize(struct_processus *s return; } + +/* +================================================================================ + Fonction 't->l' +================================================================================ + Entrées : pointeur sur une structure struct_processus +-------------------------------------------------------------------------------- + Sorties : +-------------------------------------------------------------------------------- + Effets de bord : néant +================================================================================ +*/ + +void +instruction_t_vers_l(struct_processus *s_etat_processus) +{ + logical1 last; + + (*s_etat_processus).erreur_execution = d_ex; + + if ((*s_etat_processus).affichage_arguments == 'Y') + { + printf("\n T->L "); + + if ((*s_etat_processus).langue == 'F') + { + printf("(converison d'une table en liste)\n\n"); + } + else + { + printf("(convert table to list)\n\n"); + } + + printf(" 1: %s\n", d_TAB); + printf("-> 1: %s\n", d_LST); + return; + } + else if ((*s_etat_processus).test_instruction == 'Y') + { + (*s_etat_processus).nombre_arguments = -1; + return; + } + + if (test_cfsf(s_etat_processus, 31) == d_vrai) + { + last = d_vrai; + cf(s_etat_processus, 31); + + if (empilement_pile_last(s_etat_processus, 1) == d_erreur) + { + return; + } + } + else + { + last = d_faux; + } + + instruction_table_fleche(s_etat_processus); + + if (((*s_etat_processus).erreur_systeme == d_es) && + ((*s_etat_processus).erreur_execution == d_ex)) + { + instruction_fleche_list(s_etat_processus); + } + + if (last == d_vrai) + { + sf(s_etat_processus, 31); + } + + return; +} // vim: ts=4